Skip to content

Commit abb45e1

Browse files
committed
💩 Fix @go-task/go-npm package so that @go-task/cli package can be used on Windows
1 parent 713e9a1 commit abb45e1

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

‎package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
},
9494
"pnpm": {
9595
"patchedDependencies": {
96-
96+
97+
"@go-task/[email protected]": "patches/@[email protected]"
9798
}
9899
}
99100
}

‎patches/@[email protected]

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/bin/index.js b/bin/index.js
2+
--- a/bin/index.js
3+
+++ b/bin/index.js
4+
@@ -1,1 +1,7 @@
5+
#!/usr/bin/env node
6+
+const path = require('path');
7+
+const PATH = Object.entries(process.env).concat([['path', '']]).find(([key]) => /^PATH$/i.test(key))[1];
8+
+if (
9+
+ process.env.npm_config_prefix
10+
+ && !PATH.split(path.delimiter).some(pathdir => path.resolve(pathdir) === path.resolve(process.env.npm_config_prefix, 'bin'))
11+
+) delete process.env.npm_config_prefix;

‎pnpm-lock.yaml

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)