mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Use which instead of command -v
command -v npm will return `npm` instead of the actual path to npm
This commit is contained in:
parent
845336bf3a
commit
1045daa852
1 changed files with 2 additions and 2 deletions
|
|
@ -16,8 +16,8 @@ function buildCommand(command, args) {
|
||||||
|
|
||||||
function resolveCommandPath(command) {
|
function resolveCommandPath(command) {
|
||||||
// command will be "npm", "yarn", etc.
|
// command will be "npm", "yarn", etc.
|
||||||
// Use 'command -v' to find the full path
|
// Use 'which' to find the full path
|
||||||
const fullPath = execSync(`command -v ${command}`, {
|
const fullPath = execSync(`which ${command}`, {
|
||||||
encoding: "utf8",
|
encoding: "utf8",
|
||||||
shell: true,
|
shell: true,
|
||||||
}).trim();
|
}).trim();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue