Fixes the broken shell detection

This commit is contained in:
Sander Declerck 2025-07-17 17:03:27 +02:00
parent 3825b94a09
commit 87bb095d4f
No known key found for this signature in database

View file

@ -13,11 +13,12 @@ export const knownAikidoTools = [
export function doesExecutableExistOnSystem(executableName) {
try {
if (os.platform() === "win32") {
spawnSync("where", [executableName], { stdio: "ignore" });
const result = spawnSync("where", [executableName], { stdio: "ignore" });
return result.status === 0;
} else {
spawnSync("which", [executableName], { stdio: "ignore" });
const result = spawnSync("which", [executableName], { stdio: "ignore" });
return result.status === 0;
}
return true;
} catch {
return false;
}