Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable binding shortcuts in non-TTY shells #19169

Open
4 tasks done
joelmukuthu opened this issue Jan 9, 2025 · 0 comments
Open
4 tasks done

Enable binding shortcuts in non-TTY shells #19169

joelmukuthu opened this issue Jan 9, 2025 · 0 comments

Comments

@joelmukuthu
Copy link

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

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

No branches or pull requests

1 participant