-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💩 Fix
@go-task/go-npm
package so that @go-task/cli
package can be…
… used on Windows
- Loading branch information
1 parent
713e9a1
commit abb45e1
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/bin/index.js b/bin/index.js | ||
--- a/bin/index.js | ||
+++ b/bin/index.js | ||
@@ -1,1 +1,7 @@ | ||
#!/usr/bin/env node | ||
+const path = require('path'); | ||
+const PATH = Object.entries(process.env).concat([['path', '']]).find(([key]) => /^PATH$/i.test(key))[1]; | ||
+if ( | ||
+ process.env.npm_config_prefix | ||
+ && !PATH.split(path.delimiter).some(pathdir => path.resolve(pathdir) === path.resolve(process.env.npm_config_prefix, 'bin')) | ||
+) delete process.env.npm_config_prefix; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.