mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Merge pull request #78 from AikidoSec/fish-test-command-not-working
init-fish: split up if to prevent expanded args to break the condition
This commit is contained in:
commit
04cb001006
1 changed files with 9 additions and 5 deletions
|
|
@ -47,12 +47,16 @@ function pnpx
|
||||||
end
|
end
|
||||||
|
|
||||||
function npm
|
function npm
|
||||||
if test (count $argv) -eq 1 -a \( "$argv[1]" = "-v" -o "$argv[1]" = "--version" \)
|
# If args is just -v or --version and nothing else, just run the `npm -v` command
|
||||||
# If args is just -v or --version and nothing else, just run the npm version command
|
|
||||||
# This is because nvm uses this to check the version of npm
|
# This is because nvm uses this to check the version of npm
|
||||||
|
set argc (count $argv)
|
||||||
|
if test $argc -eq 1
|
||||||
|
switch $argv[1]
|
||||||
|
case "-v" "--version"
|
||||||
command npm $argv
|
command npm $argv
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
wrapSafeChainCommand "npm" "aikido-npm" $argv
|
wrapSafeChainCommand "npm" "aikido-npm" $argv
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue