Skip to content

Enable binding shortcuts in non-TTY shells #19169

Open
@joelmukuthu

Description

Description

I'm creating a small tool for running applications in a monorepo and currently adding a "restart application" feature. I was hoping to achieve this by writing an r\n to the application's stdin stream, but this is failing because of the !process.stdin.isTTY check in bindCLIShortcuts.

Suggested solution

I'm aware that I can bypass this by starting the vite application in an interactive shell, but I was hoping it'd be possible to bypass that check by supporting a config that "forces" TTY mode. This could be an environment variable, a CLI option or maybe even adding shortcuts configs to server options, which would allow configuring other CLI-shortcut options things e.g. in this case, I'd also like to set print option to false so this info is not printed out.

Alternative

Running the application in an interactive shell i.e. instead of spawn('vite'), spawn('script', ['-c', 'vite']).

Additional context

No response

Validations

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions