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.
Files changed (2) hide show
  1. package/lib/bootstrap.js +10 -3
  2. 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 firstOutputLine(output) {
485
- return output.split(/\r?\n/).map((line) => line.trim()).find(Boolean) || "";
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
- return result.status === 0 ? firstOutputLine(result.stdout) : "";
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msdevflow",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Install the msdevflow GitCode skill and its runtime dependencies",
5
5
  "type": "module",
6
6
  "bin": {