From a0e19818a095b3e5241494d1c8f277a15658d74c Mon Sep 17 00:00:00 2001 From: Graeme Chapman Date: Wed, 31 Dec 2025 10:18:58 +0000 Subject: [PATCH 1/2] fix: Allow running commands if safe-chain npm package is not installed --- .../src/shell-integration/startup-scripts/init-posix.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh index f22f79b..7085465 100644 --- a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh +++ b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh @@ -83,6 +83,10 @@ function wrapSafeChainCommand() { # If the aikido command is not available, print a warning and run the original command 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" "$@" fi } From c510d886a95f62070355f3ee49efe1bbee7b2d70 Mon Sep 17 00:00:00 2001 From: Graeme Chapman Date: Wed, 31 Dec 2025 10:57:08 +0000 Subject: [PATCH 2/2] Simplify command execution in init-posix.sh --- .../src/shell-integration/startup-scripts/init-posix.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh index 7085465..e649909 100644 --- a/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh +++ b/packages/safe-chain/src/shell-integration/startup-scripts/init-posix.sh @@ -83,10 +83,6 @@ function wrapSafeChainCommand() { # If the aikido command is not available, print a warning and run the original command 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 "$@" fi }