build: shim for invoking node w/o .exe from WSL#43948
Open
hrishikesh-kadam wants to merge 1 commit intonodejs:mainfrom
Open
build: shim for invoking node w/o .exe from WSL#43948hrishikesh-kadam wants to merge 1 commit intonodejs:mainfrom
hrishikesh-kadam wants to merge 1 commit intonodejs:mainfrom
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
Collaborator
This was referenced Jul 24, 2022
bnoordhuis
reviewed
Jan 14, 2023
Comment on lines
+443
to
+444
| copy /Y ..\tools\msvs\node %TARGET_NAME%\ > nul | ||
| if errorlevel 1 echo Cannot copy node && goto package_error |
Member
There was a problem hiding this comment.
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.
-
cygwin's bash will run this new shim
node, which will run the originalnode.exe. -
cmd.exe will run the original
node.exeimmediately (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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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