From 87bb095d4fbb1a4bc7f7ab9843d811ffc6877c1b Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Thu, 17 Jul 2025 17:03:27 +0200 Subject: [PATCH] Fixes the broken shell detection --- src/shell-integration/helpers.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shell-integration/helpers.js b/src/shell-integration/helpers.js index b47d3d6..0295858 100644 --- a/src/shell-integration/helpers.js +++ b/src/shell-integration/helpers.js @@ -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; }