-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: add ps1 scripts #6548
feat: add ps1 scripts #6548
Conversation
I'd like to get a better idea of how you are currently running these scripts on your system. You mention installing them here This can be merged into @mribbons Would you be able to open an issue or PR on https://github.com/nodejs/node to get feedback on how the Windows installers work, and if it would be appropriate for Also in the meantime, would shipping these scripts in the npm bin dir, even if they dont get linked via the Windows installer, fix #6280? |
Also this will need to land with some tests in @mribbons If you want to attempt that, go for it. Otherwise I will work on those. |
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.
Requesting changes until we have feedback from Node and tests.
I'll give it a shot! |
C:\Program Files\nodejs\npm.ps1
Using
My guess is no, the new scripts probably won't be deployed by the installer. Thanks for your help. |
88b3246
to
5c16d7d
Compare
@mribbons I pushed a commit to this PR implementing tests for the powershell scripts you added. I did make one minor change to the scripts to match the behavior of the other bin scripts, so they now run I'm not sure if all the tests will pass cleanly here since I've been doing some Windows cleanup in #6586 that might need to merge first. But I tested the combination of that PR and this one on my local machine and it worked. Edit: tests are failing but will be fixed once #6586 and eol normalization lands. Once it does I'll rebase this branch to make sure tests are passing. |
5c16d7d
to
b4b4b6f
Compare
@lukekarrys You are the man, thankyou! |
26a0b81
to
52118a4
Compare
52118a4
to
449361a
Compare
Code has been updated and needs a new reviewer thats not me
449361a
to
451c46e
Compare
This has been rebased to include the changes from #6586 so that tests will pass. That PR will need to be merged first. |
npm has PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. The PoweShell scripts should only be placed if they exist in npm's bin directory. Closes: nodejs#48471 Ref: npm/cli#6548
Resolves UNC path issues because powershell.exe supports UNC, while cmd.exe doesn't. (Which is why npm.cmd doesn't work within UNC paths, even under powershell) Resolves npm#6280
451c46e
to
cca0e25
Compare
npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Closes: #48471 Ref: npm/cli#6548
npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Fixes: #48471 Refs: npm/cli#6548
npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Fixes: #48471 Refs: npm/cli#6548 PR-URL: #52009 Reviewed-By: Luigi Pinca <[email protected]>
npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Fixes: #48471 Refs: npm/cli#6548 PR-URL: #52009 Reviewed-By: Luigi Pinca <[email protected]>
npm 9.8.0 added PowerShell scripts that should be installed alongside the cmd and shell scripts on Windows. Fixes: #48471 Refs: npm/cli#6548 PR-URL: #52009 Reviewed-By: Luigi Pinca <[email protected]>
Resolves UNC path issues because powershell.exe
supports UNC, while cmd.exe doesn't.
(Which is why npm.cmd doesn't work within
UNC paths, even under powershell)
Added ps1 versions of npm and npx
Closes #6280