Skip to content

Commit

Permalink
fix: πŸ› endless loop on Windows when getting local bins
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 27, 2020
1 parent 8b7b0be commit 17d250c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class CommandParser {
while (cwd != "/") {
const p = posix.resolve(cwd, "./node_modules/.bin")
if (existsSync(p)) this.bins.push(p)
cwd = posix.resolve(cwd, "../")
const up = posix.resolve(cwd, "../")
if (up == cwd) break
cwd = up
}
}

Expand Down

0 comments on commit 17d250c

Please sign in to comment.