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

build: shim for invoking node w/o .exe from WSL #43948

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ deps/npm/bin/npm text eol=lf
deps/npm/bin/npx text eol=lf
deps/corepack/shims/corepack text eol=lf
tools/msvs/find_python.cmd text eol=crlf
tools/msvs/node text eol=lf
4 changes: 4 additions & 0 deletions tools/msvs/node
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# Shim for invoking node without .exe from WSL
basedir=$(dirname "$0")
"$basedir/node.exe" "$@"
2 changes: 2 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ mkdir %TARGET_NAME%\node_modules > nul 2>nul

copy /Y node.exe %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy node.exe && goto package_error
copy /Y ..\tools\msvs\node %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy node && goto package_error
Comment on lines +443 to +444
Copy link
Member

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?

copy /Y ..\LICENSE %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy LICENSE && goto package_error
copy /Y ..\README.md %TARGET_NAME%\ > nul
Expand Down