Skip to content

input_prompt is not working inside functions #687

Open
@gbourant

Description

@gbourant

I try to run the input_prompt inside a function and it's not working. When I run this script directly, it doesn't ever show or ask for a prompt, but the echo "name: {name}" prints name: if [ $(.

#!/usr/bin/env amber

import { input_prompt } from "std/env"

fun installer() {
    const name = input_prompt("Please enter your name:");
    echo "name: {name}"
}

main (args) {
    installer()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstdlib

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions