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

fix(cli): exit 1 on ctrl+c #11563

Merged
merged 1 commit into from Jan 26, 2023
Merged

fix(cli): exit 1 on ctrl+c #11563

merged 1 commit into from Jan 26, 2023

Conversation

ArnaudBarre
Copy link
Member

@ArnaudBarre ArnaudBarre commented Jan 3, 2023

This seems to be the only option to enable both shortcuts and exiting vite running via npm-run-all with default options in one ctrl+c.

The bad part is that when running vite via yarn or pnpm, you get an extra error on exit:

Screenshot 2023-01-03 at 02 05 33

When using npm-run-all, it logs: ERROR: "dev" exited with 1.

The other option is to not fix the issue. I suggested multiple way to "workaround" the issue: #11434 (comment)

For information, vitest is exiting is code 0 which is subject to the same issue (but probably people don't use vitest watch mode along other watch process)

Re: #11518 #11562

@ArnaudBarre ArnaudBarre self-assigned this Jan 3, 2023
Copy link
Contributor

@chenfan0 chenfan0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement here is inaccessible, so it is better to delete it

@ArnaudBarre ArnaudBarre removed the p2-to-be-discussed Enhancement under consideration (priority) label Jan 26, 2023
@ArnaudBarre
Copy link
Member Author

@patak-dev Updated and tested. You get double "exit error 1" command when running npm-run-all with pnpm but I guess that's fine

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

Successfully merging this pull request may close these issues.

None yet

3 participants