Skip to content

fix(powershell): use Invoke-Expression to pass args #164

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

Closed
wants to merge 11 commits into from

Conversation

alexsch01
Copy link

@alexsch01 alexsch01 commented Aug 14, 2025

Based on npm/cli#8343 and npm/cli@5d82d0b


if the "program" can't be found
it will use the old behavior


if the executable cli file has Shebang with argument

#!/usr/bin/env prog anyArg

such as

#!/usr/bin/env node --env-file=.env

it will use the old behavior


if the executable cli file has Shebang (no argument)

#!/usr/bin/env prog

such as

#!/usr/bin/env node

it will use the new behavior

@alexsch01 alexsch01 requested a review from a team as a code owner August 14, 2025 17:24
@alexsch01
Copy link
Author

@wraithgar sorry to ping directly, but please let me know your feedback on this and I'll look into adding test

@alexsch01
Copy link
Author

alexsch01 commented Aug 19, 2025

This would be a semver major change for npm and a semver major change for nodejs

@alexsch01 alexsch01 marked this pull request as draft August 19, 2025 13:01
@alexsch01 alexsch01 marked this pull request as ready for review August 19, 2025 13:13
@wraithgar
Copy link
Member

This would be a semver major change for npm and a semver major change for nodejs

I'm confused, this PR is a semver major change, or this PR fixes a semver major change?

@alexsch01
Copy link
Author

alexsch01 commented Aug 20, 2025

This would be a semver major change for npm and a semver major change for nodejs

I'm confused, this PR is a semver major change, or this PR fixes a semver major change?

First one - this is a semver major change

I repeated semver major change for nodejs to emphasize that it shouldn't go in with a nodejs minor release

@wraithgar
Copy link
Member

Ok, next question: is that just for this repo or will that semver-major change bubble up to npm itself? Put another way, will we be able to edit npm's code to handle this change gracefully?

I suppose though if it's going to be semver major for node itself the point is irrelevant. Unless I'm missing something I don't see how this can go in with npm 11. We may have to wait till npm 12.

@alexsch01
Copy link
Author

alexsch01 commented Aug 20, 2025

@wraithgar yeah npm 12 sounds good to me

the version of cmd-shim in npm will need to have its version bumped

  • that's how I tested it on my machine

@wraithgar
Copy link
Member

I have added a comment to npm/statusboard#930. That's where we are tracking our future breaking changes. npm 12 is not currently on a roadmap but that issue will get more activity when that time comes.

@wraithgar wraithgar closed this Aug 20, 2025
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.

2 participants