squad-station 0.8.19 → 0.8.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +7 -3
- package/package.json +1 -1
package/bin/run.js
CHANGED
|
@@ -45,7 +45,7 @@ function install() {
|
|
|
45
45
|
|
|
46
46
|
function installBinary() {
|
|
47
47
|
// Binary version — may differ from npm package version
|
|
48
|
-
var VERSION = '0.8.
|
|
48
|
+
var VERSION = '0.8.21';
|
|
49
49
|
var REPO = 'thientranhung/squad-station';
|
|
50
50
|
|
|
51
51
|
var isWindows = process.platform === 'win32';
|
|
@@ -181,8 +181,12 @@ function verifyInPath(destPath, installDir) {
|
|
|
181
181
|
var checkResult = spawnSync(checkCmd, ['squad-station'], { encoding: 'utf8' });
|
|
182
182
|
|
|
183
183
|
if (checkResult.status === 0 && checkResult.stdout && checkResult.stdout.trim()) {
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
var foundPath = checkResult.stdout.trim();
|
|
185
|
+
// Ignore npx cache / node_modules wrappers — not real user PATH entries
|
|
186
|
+
if (!foundPath.includes('.npm/_npx') && !foundPath.includes('node_modules/.bin') && !foundPath.includes('node_modules\\.bin')) {
|
|
187
|
+
// Binary is found in real PATH — all good
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
186
190
|
}
|
|
187
191
|
|
|
188
192
|
if (isWindows) {
|