Skip to content

Void commands exit 0 when they are waiting on a prompt and stdin is closed #964

Done

Description

@hyfdev

When stdin is closed, as in CI or with < /dev/null, a Void command that reaches a prompt prints it and exits 0, as if it had succeeded:

$ void db connect --local-only < /dev/null

› Enter your PostgreSQL connection string:
  postgresql://user:pass@host:5432/database
$ echo $?
0

To reproduce, run that command in a project whose void.config.ts sets database: 'pg'.

The same happens at the prompts in void account, void auth, void db, void gen and void project, while void deploy exits 13 with Detected unsettled top-level await when it asks for a missing Hyperdrive binding.

Node exits once nothing is left to wait for, and a Clack prompt never settles after its input ends (bombshell-dev/clack#615), so the command never reports a failure.

#963 fixes it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions