Search PATHEXT instead of 3 hardcoded values#134
Closed
dead-claudia wants to merge 2 commits intoshelljs:masterfrom
dead-claudia:patch-1
Closed
Search PATHEXT instead of 3 hardcoded values#134dead-claudia wants to merge 2 commits intoshelljs:masterfrom dead-claudia:patch-1
dead-claudia wants to merge 2 commits intoshelljs:masterfrom
dead-claudia:patch-1
Conversation
added 2 commits
June 15, 2014 17:20
Better to search the PATHEXT variable instead of hard-coding an incomplete list for Windows executables. A default fallback consisting of XP's default value is also introduced just in case. The fallback value is hardcoded as a constant at the top of the file. It also results in simpler code.
Collaborator
|
Hi- thanks for the patch. Alas I no longer have a Windows machine to test this on and Travis doesn't support Windows, can someone please confirm the tests pass? Thanks! |
Member
Author
|
Closed this and redid it in #290. Problem was that I have changed my username since I made the original PR. |
dead-claudia
pushed a commit
to dead-claudia/shelljs
that referenced
this pull request
Jan 29, 2016
Redo of shelljs#134 `which` now searches through PATHEXT on Windows, and it also now does a case-insensitive comparison. This better fits the Windows environment, where the OS usually ignores case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Better to search the PATHEXT variable instead of hard-coding an incomplete list for Windows executables. A default fallback consisting of XP's default value is also introduced just in case. The fallback value is hardcoded as a constant at the top of the file.