Skip to content

Fix #667 - use which's result#668

Closed
refack wants to merge 2 commits intonodejs:masterfrom
refack:patch-1
Closed

Fix #667 - use which's result#668
refack wants to merge 2 commits intonodejs:masterfrom
refack:patch-1

Conversation

@refack
Copy link
Copy Markdown
Contributor

@refack refack commented Jul 19, 2015

No description provided.

@refack
Copy link
Copy Markdown
Contributor Author

refack commented Oct 3, 2015

Fixes #750

Comment thread lib/configure.js Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <[email protected]>
bnoordhuis pushed a commit that referenced this pull request Nov 24, 2015
Fixes: #667
Fixes: #750
PR-URL: #668
Reviewed-By: Ben Noordhuis <[email protected]>
@bnoordhuis
Copy link
Copy Markdown
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