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

Fix #667 - use which's result #668

Closed
wants to merge 2 commits into from
Closed

Fix #667 - use which's result #668

wants to merge 2 commits into from

Conversation

refack
Copy link
Contributor

@refack refack commented Jul 19, 2015

No description provided.

@refack
Copy link
Contributor Author

refack commented Oct 3, 2015

Fixes #750

@@ -48,6 +48,7 @@ function configure (gyp, argv, callback) {
}
} else {
log.verbose('`which` succeeded', python, execPath)
python = execPath
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Member

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

@refack
Copy link
Contributor Author

refack commented Oct 4, 2015

Added comment.
As for adding a test, I'm hesitant since it will need to manipulate the environment, while beeing windows specific...

@refack refack mentioned this pull request Oct 4, 2015
bnoordhuis added a commit that referenced this pull request Nov 24, 2015
Break out the search logic into a separate function and add a regression
test.

References: #668
PR-URL: #756
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
bnoordhuis pushed a commit that referenced this pull request Nov 24, 2015
Fixes: #667
Fixes: #750
PR-URL: #668
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@bnoordhuis
Copy link
Member

Thanks, landed in 268f1ca.

@bnoordhuis bnoordhuis closed this Nov 24, 2015
@refack refack deleted the patch-1 branch October 20, 2018 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants