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:
Sander Declerck 2025-09-24 15:47:12 +02:00 committed by GitHub
commit 04cb001006
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,12 +47,16 @@ function pnpx
end
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 version command
# If args is just -v or --version and nothing else, just run the `npm -v` command
# 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
return
end
end
wrapSafeChainCommand "npm" "aikido-npm" $argv
end