Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(installer): resolve bin dir before shell setup
jkomyno47ae5f302994
diff --git a/install.sh b/install.shindex 57a56dc2c..7407c0df3 100755--- a/install.sh+++ b/install.sh@@ -347,16 +347,16 @@ inline_shell_setup() {setup_requested_shell() {if "$exe" install --help 2>&1 | grep -q -- '--shell'; thendebug "delegating shell setup to $exe install --shell $requested_shell"- if COMPOSIO_CLI_INVOCATION_ORIGIN=installer COMPOSIO_BIN_DIR="$COMPOSIO_BIN_DIR" "$exe" install --shell "$requested_shell"; then+ if COMPOSIO_CLI_INVOCATION_ORIGIN=installer COMPOSIO_BIN_DIR="$resolved_bin_dir" "$exe" install --shell "$requested_shell"; thenshell_configured=clielsedebug "falling back to inline $requested_shell shell setup"- inline_shell_setup "$requested_shell" "$COMPOSIO_BIN_DIR"+ inline_shell_setup "$requested_shell" "$resolved_bin_dir"shell_configured=fallbackfielsedebug "falling back to inline $requested_shell shell setup"- inline_shell_setup "$requested_shell" "$COMPOSIO_BIN_DIR"+ inline_shell_setup "$requested_shell" "$resolved_bin_dir"shell_configured=fallbackfidiff --git a/test/install-sh-release-resolution.test.sh b/test/install-sh-release-resolution.test.shindex e620c3a45..3306bbd1c 100755--- a/test/install-sh-release-resolution.test.sh+++ b/test/install-sh-release-resolution.test.sh@@ -554,7 +554,8 @@ EOFvariant_install="$case_root/variant-$shell_name-install"variant_bin="$case_root/variant-$shell_name-bin"variant_output=$(run_variant "$shell_name" "$variant_home" "$variant_install" "$variant_bin" "$stable_tag" --no-plugins 2>&1)- grep -Fq "|installer|$variant_bin|install --shell $shell_name" "$composio_log" ||+ expected_variant_bin=$(cd "$variant_bin" && pwd -P)+ grep -Fq "|installer|$expected_variant_bin|install --shell $shell_name" "$composio_log" ||fail "$interpreter_name $shell_name variant delegation"assert_contains "$variant_output" "Configured $shell_name shell setup (cli)." "$interpreter_name $shell_name variant confirmation"assert_not_contains "$variant_output" 'Required next step' "$interpreter_name $shell_name variant must not print setup guidance"@@ -566,11 +567,35 @@ EOFdirect_home="$case_root/direct-shell-home"direct_bin="$case_root/direct-shell-bin"direct_output=$(run_installer "$direct_home" "$case_root/direct-shell-install" "$direct_bin" "$stable_tag" 2>&1)- grep -Fq "|installer|$direct_bin|install --shell zsh" "$composio_log" || fail "$interpreter_name COMPOSIO_INSTALL_SHELL delegation"+ expected_direct_bin=$(cd "$direct_bin" && pwd -P)+ grep -Fq "|installer|$expected_direct_bin|install --shell zsh" "$composio_log" || fail "$interpreter_name COMPOSIO_INSTALL_SHELL delegation"assert_contains "$direct_output" 'Configured zsh shell setup (cli).' "$interpreter_name COMPOSIO_INSTALL_SHELL confirmation"assert_not_contains "$direct_output" 'Required next step' "$interpreter_name COMPOSIO_INSTALL_SHELL must not print setup guidance"[[ ! -e "$direct_home/.zshrc" ]] || fail "$interpreter_name COMPOSIO_INSTALL_SHELL CLI path must not write rc files"+ reset_case+ CASE_INSTALL_SHELL=zsh+ relative_work="$case_root/relative-shell-work"+ relative_home="$case_root/relative-shell-home"+ relative_install="$case_root/relative-shell-install"+ mkdir -p "$relative_work"+ (cd "$relative_work" && run_installer "$relative_home" "$relative_install" relative-bin "$stable_tag" >/dev/null 2>&1)+ expected_relative_bin=$(cd "$relative_work/relative-bin" && pwd -P)+ grep -Fq "|installer|$expected_relative_bin|install --shell zsh" "$composio_log" ||+ fail "$interpreter_name relative COMPOSIO_BIN_DIR delegation must receive the resolved absolute path"++ reset_case+ CASE_INSTALL_SHELL=zsh+ CASE_SHELL_CAPABILITY=unsupported+ relative_fallback_work="$case_root/relative-fallback-work"+ relative_fallback_home="$case_root/relative-fallback-home"+ relative_fallback_install="$case_root/relative-fallback-install"+ mkdir -p "$relative_fallback_work"+ (cd "$relative_fallback_work" && run_installer "$relative_fallback_home" "$relative_fallback_install" relative-bin "$stable_tag" >/dev/null 2>&1)+ expected_relative_fallback_bin=$(cd "$relative_fallback_work/relative-bin" && pwd -P)+ grep -Fq "export PATH=\"$expected_relative_fallback_bin:\$PATH\"" "$relative_fallback_home/.zshrc" ||+ fail "$interpreter_name relative COMPOSIO_BIN_DIR fallback must persist the resolved absolute path"+reset_caseCASE_INSTALL_SHELL=zshCASE_SHELL_CAPABILITY=unsupported