-
Notifications
You must be signed in to change notification settings - Fork 592
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
[rush] Certain npm scripts break the console inputs after ctrl+c #3154
Comments
It seems that running the bin related scripts directly do not have these issues. {
"name": "select-node",
"commandKind": "global",
"summary": "Run rush-select",
"safeForSimultaneousRushProcesses": true,
"autoinstallerName": "select",
"shellCommand": "node ./common/autoinstallers/select/node_modules/@telia/rush-select/dist/index.js"
} This works fine. So I have a workaround for both cases now. |
#2638 probably related |
I investigated something similar in #2613. To clarify: can you recreate this problem with rushx, or is it only a rush problem? For example, do you have a script in a package where running (EDIT: And your pnpm version set in the rush.json, if applicable... it is possible that the pnpm pointed at by your shell is a different version than the one rush is executing.) |
@elliot-nelson Hi yes the issue is present with both rush and rushx, I have included both the cases in the repo I provided https://github.com/anantoghosh/rush-cli-issue, you could try running the Running the script via global pnpm or even npm has no issues. For the given repo, I did keep both the globally installed pnpm and the rush pnpm version to the same version v6.26.0. |
Summary
Some npm scripts which run a continuous process, cause the console to behave weirdly after closing via ctrl+c.
While in running other (non rush) commands, ctrl+c waits for "Terminate batch job?", but when running the problematic scripts via rush, ctrl+c instantly ends the running process but shows "Terminate batch job" after a few seconds overlaying the cli. After which the console stops accepting any proper input and trying to ctrl+c again after a while starts skipping every other input, forcing us to close it completely.
Here you can see the state after ctrl+c, trying to run
ls
does not work. It's showing "Terminate batch job?" but that does not accept any inputs. ctrl+c again does not fix it. After a while it start skipping every second input.Similar behavior with rush custom command running
rush-select
.We observe the issue in multiple different systems.
It can be seen with powershell core 7, powershell 5 and cmd.
Repro steps
I've added a repo for you to check out.
I'm using the default stencil https://stenciljs.com/ starter here, and running its dev server will cause the problem.
I've also added a auto installer
rush select
which runs@telia/rush-select
.Minimal repo
https://github.com/anantoghosh/rush-cli-issue
Details
Running scripts with
npm
orpnpm
behave as expected. We use it as a workaround.But we don't have that option when running rush custom commands.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: