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

Recursive invocations for node --run in Windows are incorrect #1168

Open
aomarks opened this issue Aug 22, 2024 · 0 comments
Open

Recursive invocations for node --run in Windows are incorrect #1168

aomarks opened this issue Aug 22, 2024 · 0 comments

Comments

@aomarks
Copy link
Member

aomarks commented Aug 22, 2024

The tests for node --run named run recurse -> run start --watch and run recurse -> run start --watch --extra fail on Windows. It seems to be a similar problem to what Yarn does, where when you do recursive calls, the environment variable that says what script we're in (NODE_RUN_SCRIPT_NAME in this case) reflects the first call, instead of the last.

This is very likely a Windows-specific Node bug, so the next step is to confirm it and file an issue. Then we can un-skip those tests in Windows once fixed.

aomarks added a commit that referenced this issue Aug 22, 2024
Adds support for the new node --run feature which is available starting in Node 22 (basically npm run but faster, see https://nodejs.org/en/blog/announcements/v22-release-announce#running-packagejson-scripts and https://www.yagiz.co/developing-fast-builtin-task-runner/).

Note that node --run is stricter than the other runners when it comes to distinguishing between arguments for the runner vs the script, so an additional -- is needed to set wireit flags and script flags (explained in the README).

Thank you very much to @anonrig for adding the environment variables this required (nodejs/node#53032, nodejs/node#53058) and @justinfagnani for filing the issue (nodejs/node#52673)!

There is a problem with recursive invocations on Windows that I believe is a Node bug but need to double-check, tracking at #1168.

Fixes #1094
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

No branches or pull requests

1 participant