Skip to content

Commit

Permalink
wip fix for paths starting with ../
Browse files Browse the repository at this point in the history
Re: #33
  • Loading branch information
isaacs committed May 18, 2016
1 parent 960bd4a commit 185da79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion which.js
Expand Up @@ -108,7 +108,7 @@ function whichSync (cmd, opt) {
pathPart = pathPart.slice(1, -1)

var p = path.join(pathPart, cmd)
if (!pathPart && (/^\./).test(cmd)) {
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
p = cmd.slice(0, 2) + p
}
for (var j = 0, ll = pathExt.length; j < ll; j ++) {
Expand Down

0 comments on commit 185da79

Please sign in to comment.