msdevflow 0.7.1 → 0.7.2
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/lib/bootstrap.js +10 -3
- package/package.json +1 -1
package/lib/bootstrap.js
CHANGED
|
@@ -481,8 +481,8 @@ function validatePythonRequirements(file) {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
function
|
|
485
|
-
return output.split(/\r?\n/).map((line) => line.trim()).
|
|
484
|
+
function outputLines(output) {
|
|
485
|
+
return output.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
export function resolveExecutable(name, run, platform) {
|
|
@@ -490,7 +490,14 @@ export function resolveExecutable(name, run, platform) {
|
|
|
490
490
|
? { command: "where.exe", args: [name] }
|
|
491
491
|
: { command: "sh", args: ["-c", "command -v -- \"$1\"", "sh", name] };
|
|
492
492
|
const result = runOptional(run, invocation);
|
|
493
|
-
|
|
493
|
+
if (result.status !== 0) {
|
|
494
|
+
return "";
|
|
495
|
+
}
|
|
496
|
+
const candidates = outputLines(result.stdout);
|
|
497
|
+
if (platform === "win32") {
|
|
498
|
+
return candidates.find((candidate) => /\.(?:com|exe|cmd|bat|ps1)$/i.test(candidate)) || "";
|
|
499
|
+
}
|
|
500
|
+
return candidates[0] || "";
|
|
494
501
|
}
|
|
495
502
|
|
|
496
503
|
export function detectClients(run, platform) {
|