-
Notifications
You must be signed in to change notification settings - Fork 103
Update to stop:npm-proxy for Windows
#2053
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
Conversation
|
scripts/stop_npm_proxy.ts
Outdated
| if (process.platform === 'win32') { | ||
| const netStatResult = await execaCommand( | ||
| `netstat -n -a -o | grep ${VERDACCIO_PORT}`, | ||
| { shell: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this going to work in Powershell ?
if not then consider shell: 'bash'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grep command does not work in Powershell (also doesn't work in command prompt), I'll update that
Problem
npm:stop-proxycommand was unable to be run without an error on Windows, so verdaccio process could not be killed. This stems fromlsofcommand not existing on Windows.Issue number, if available:
Changes
stop-npm-proxy.tson Windows machinenetstatwas the best equivalent tolsofthat I could find for windows) to find PID of verdaccio so the process can be killedCorresponding docs PR, if applicable:
Validation
Checked that process running on verdaccio port is killed after
stop:npm-proxycommand is runChecklist
run-e2elabel set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.