-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
build: shim for invoking node w/o .exe from WSL #43948
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
base: main
Are you sure you want to change the base?
build: shim for invoking node w/o .exe from WSL #43948
Conversation
7295f00
to
04e8794
Compare
This issue has been described in - nodejs#43861 Reason for using build subsystem - Shims will be just copied in the stage_package label of vcbuild.bat Fixes: nodejs#43861
04e8794
to
4895d42
Compare
copy /Y ..\tools\msvs\node %TARGET_NAME%\ > nul | ||
if errorlevel 1 echo Cannot copy node && goto package_error |
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.
How does this affect non-WSL? What happens when I type node
in cmd.exe? In cygwin's bash.exe?
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.
-
cygwin's bash will run this new shim
node
, which will run the originalnode.exe
. -
cmd.exe will run the original
node.exe
immediately (files with exe extension take precendence). -
This idea of having 2 shims in the bin directory (one without extension for sh/bash shells and one with an extension .exe/.cmd/.bat for cmd/powershell shells) is not new, and is used by a lot of apps/packages, vscode and npm use this for example
This issue has been described in -
#43861
Reason for using build subsystem -
Shims will be just copied in the stage_package label of vcbuild.bat
Fixes: #43861