fix: Allow running commands if safe-chain npm package is not installed

This commit is contained in:
Graeme Chapman 2025-12-31 10:18:58 +00:00 committed by GitHub
parent acb4aa1a13
commit a0e19818a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,6 +83,10 @@ function wrapSafeChainCommand() {
# If the aikido command is not available, print a warning and run the original command # If the aikido command is not available, print a warning and run the original command
printSafeChainWarning "$original_cmd" printSafeChainWarning "$original_cmd"
# Remove the first argument (original_cmd) from $@
# so that "$@" now contains only the arguments passed to the original command
shift 1
command "$original_cmd" "$@" command "$original_cmd" "$@"
fi fi
} }