From 1045daa8528433eb2b284a097a959f9b64eb2b5b Mon Sep 17 00:00:00 2001 From: Hans Ott Date: Thu, 9 Oct 2025 17:22:34 +0200 Subject: [PATCH] Use which instead of command -v command -v npm will return `npm` instead of the actual path to npm --- packages/safe-chain/src/utils/safeSpawn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/safe-chain/src/utils/safeSpawn.js b/packages/safe-chain/src/utils/safeSpawn.js index 895c498..7646d52 100644 --- a/packages/safe-chain/src/utils/safeSpawn.js +++ b/packages/safe-chain/src/utils/safeSpawn.js @@ -16,8 +16,8 @@ function buildCommand(command, args) { function resolveCommandPath(command) { // command will be "npm", "yarn", etc. - // Use 'command -v' to find the full path - const fullPath = execSync(`command -v ${command}`, { + // Use 'which' to find the full path + const fullPath = execSync(`which ${command}`, { encoding: "utf8", shell: true, }).trim();