@devries-cameron20 / composio Mirror · read-only / commits / b11f31cec
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 17:15 UTC

fix(installer): satisfy shellcheck in install.sh and the shell variants

The Install Script Unit Tests job runs `shellcheck -s sh install.sh install/*.sh`, which exits non-zero on any finding including info-level ones. Four SC2015 diagnostics ("A && B || C is not if-then-else") failed the job on next, which also skipped the Test Install Script legs that depend on it. Rewrite both patterns as explicit conditionals. Behavior is unchanged: debug() still prints only when COMPOSIO_DEBUG is truthy and still returns 0 otherwise, and the release-metadata guard still aborts when either field is empty.

jkomyno committed Aug 5, 2026 at 18:41 UTC b11f31cec8ef76f409419df91c2a48b09b23ca1f
4 files changed +6 -4
install.sh
+3 -1
@@ -532,7 +532,9 @@ main() {
532 error "Failed to determine the latest CLI release with a $archive_name asset. Specify a version manually."
533 version=$(printf '%s\n' "$latest_release" | sed -n '1p')
534 archive_url=$(printf '%s\n' "$latest_release" | sed -n '2p')
535 - [ -n "$version" ] && [ -n "$archive_url" ] || error 'The release API returned an incomplete CLI release'
535 + if [ -z "$version" ] || [ -z "$archive_url" ]; then
536 + error 'The release API returned an incomplete CLI release'
537 + fi
538 info "Found latest version: $version"
539 fi
540 validate_url "$archive_url" || error "Release API returned an unsafe archive URL \"$archive_url\""
install/bash.sh
+1 -1
@@ -8,7 +8,7 @@ error() {
8 exit 1
9 }
10 is_true() { case ${1:-} in 1 | true) return 0 ;; *) return 1 ;; esac }
11 -debug() { is_true "${COMPOSIO_DEBUG:-}" && printf '+ %s\n' "$*" >&2 || :; }
11 +debug() { if is_true "${COMPOSIO_DEBUG:-}"; then printf '+ %s\n' "$*" >&2; fi; }
12
13 url_authority() {
14 printf '%s\n' "$1" | sed -e 's#^[a-zA-Z][a-zA-Z0-9+.-]*://##' -e 's#[/?#].*$##'
install/fish.sh
+1 -1
@@ -8,7 +8,7 @@ error() {
8 exit 1
9 }
10 is_true() { case ${1:-} in 1 | true) return 0 ;; *) return 1 ;; esac }
11 -debug() { is_true "${COMPOSIO_DEBUG:-}" && printf '+ %s\n' "$*" >&2 || :; }
11 +debug() { if is_true "${COMPOSIO_DEBUG:-}"; then printf '+ %s\n' "$*" >&2; fi; }
12
13 url_authority() {
14 printf '%s\n' "$1" | sed -e 's#^[a-zA-Z][a-zA-Z0-9+.-]*://##' -e 's#[/?#].*$##'
install/zsh.sh
+1 -1
@@ -8,7 +8,7 @@ error() {
8 exit 1
9 }
10 is_true() { case ${1:-} in 1 | true) return 0 ;; *) return 1 ;; esac }
11 -debug() { is_true "${COMPOSIO_DEBUG:-}" && printf '+ %s\n' "$*" >&2 || :; }
11 +debug() { if is_true "${COMPOSIO_DEBUG:-}"; then printf '+ %s\n' "$*" >&2; fi; }
12
13 url_authority() {
14 printf '%s\n' "$1" | sed -e 's#^[a-zA-Z][a-zA-Z0-9+.-]*://##' -e 's#[/?#].*$##'