@devries-cameron20 / composio-1 / commits / 0192b2ba8
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(install): use exact line matching for shell config marker detection

grep -qF does substring matching, so the PATH marker "# Composio CLI" would falsely match "# Composio CLI completions". Switch to grep -qxF to require full-line matches, consistent with the TS fileContains logic.

jkomyno committed Mar 9, 2026 at 09:28 UTC 0192b2ba83364d30d8d571b8bf03fdec8584343e
1 file changed +3 -3
install.sh
+3 -3
@@ -194,7 +194,7 @@ else
194 fish_config=$HOME/.config/fish/config.fish
195 if [[ -w $fish_config ]] || [[ -w $(dirname "$fish_config") ]]; then
196 mkdir -p "$(dirname "$fish_config")"
197 - if ! grep -qF "$marker" "$fish_config" 2>/dev/null; then
197 + if ! grep -qxF "$marker" "$fish_config" 2>/dev/null; then
198 { echo -e "\n$marker"; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$fish_config"
199 info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$fish_config")\""
200 else
@@ -214,7 +214,7 @@ else
214 zsh_config=$HOME/.zshrc
215 if [[ ! -f $zsh_config && -w $(dirname "$zsh_config") ]]; then touch "$zsh_config"; fi
216 if [[ -w $zsh_config ]]; then
217 - if ! grep -qF "$marker" "$zsh_config" 2>/dev/null; then
217 + if ! grep -qxF "$marker" "$zsh_config" 2>/dev/null; then
218 { echo -e "\n$marker"; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$zsh_config"
219 info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$zsh_config")\""
220 else
@@ -238,7 +238,7 @@ else
238 set_manually=true
239 for bash_config in "${bash_configs[@]}"; do
240 if [[ -w $bash_config ]]; then
241 - if ! grep -qF "$marker" "$bash_config" 2>/dev/null; then
241 + if ! grep -qxF "$marker" "$bash_config" 2>/dev/null; then
242 { echo -e "\n$marker"; for cmd in "${commands[@]}"; do echo "$cmd"; done; } >>"$bash_config"
243 info "Added \"$(tildify "$COMPOSIO_INSTALL_DIR")\" to \$PATH in \"$(tildify "$bash_config")\""
244 else