-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix #667 - use which
's result
#668
Conversation
Fixes #750 |
@@ -48,6 +48,7 @@ function configure (gyp, argv, callback) { | |||
} | |||
} else { | |||
log.verbose('`which` succeeded', python, execPath) | |||
python = execPath |
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.
What does this fix? If which('python')
succeeds, then by definition python is on the PATH, right?
EDIT: Let me rephrase. #750 is about batch files. How does using execPath help here?
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.
the which
module is more similar to windows PATH resolution semantics then the following require('child_process').execFile in line 85.
execFile
fails to resolve *.bat and *.cmd files from the PATH, but will run them if explicitly specified to.
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.
Can you add a comment explaining that (Properly capitalized and punctuated, please.)?
It would be nice to have some kind of regression test for this. Maybe you can module.exports.test.checkPython = checkPython
and verify in the test that executing the result with -V
prints the python version banner?
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 went ahead and filed a PR that adds a regression test: #756
Added comment. |
Thanks, landed in 268f1ca. |
No description provided.