Use which instead of command -v

command -v npm will return `npm` instead of the actual path to npm
This commit is contained in:
Hans Ott 2025-10-09 17:22:34 +02:00
parent 845336bf3a
commit 1045daa852

View file

@ -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();