-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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,win: replace run-python subroutine with single find_python call #18621
Conversation
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop.
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.
One nit, otherwise LGTM!
@@ -165,6 +165,9 @@ if "%target%"=="Clean" echo deleting %~dp0deps\icu | |||
if "%target%"=="Clean" rmdir /S /Q %~dp0deps\icu | |||
:no-depsicu | |||
|
|||
call tools\msvs\find_python.cmd |
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.
Maybe redirect to NUL, to avoid ERROR: The system was unable to find the specified registry key or value.
?
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.
I don't really like combining unrelated fixes in a single PR (this line was just moved from :run-python
). Plus, I think it would be better to fix this inside find_python.cmd
itself.
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.
Changes LGTM
Failures are unrelated. |
...but the commit title is to too long. @seishun, could you make the commit title <50 chars long? |
I don't think so, and it's not a requirement: https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines
|
Landed in cfad441 |
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop. PR-URL: #18621 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]>
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop. PR-URL: #18621 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]>
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop. PR-URL: #18621 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]>
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop. PR-URL: nodejs#18621 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Should this be backported to |
@MylesBorins seems pointless. |
PR-URL: #41235 Refs: #18621 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #41235 Refs: #18621 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#41235 Refs: nodejs#18621 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #41235 Refs: #18621 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
A subroutine does not work as a replacement for the
python
commandsince one cannot use a subroutine call in a
for /F
loop.This is an alternative to #17293 and #17804. I realized that
find_python.cmd
adds Python toPATH
, so there is no need to introduce a variable.I still slightly prefer #17293 for the reasons outlined in #17804 (basically, extra maintenance), but I prefer this PR to #17804 since it doesn't introduce an extra variable.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build