@devries-cameron20 / composio-1 / commits / c5c3203db
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): prioritize Windows platform guidance

jkomyno committed Jul 28, 2026 at 21:15 UTC c5c3203db65dec6e7f65ad8d8319d95b124e410d
2 files changed +74 -5
install.sh
+5 -5
@@ -69,11 +69,6 @@ tildify() {
69 fi
70 }
71
72 -# --- Prerequisites ---
73 -
74 -command -v curl >/dev/null || error 'curl is required to install Composio CLI'
75 -command -v unzip >/dev/null || error 'unzip is required to install Composio CLI'
76 -
72 install_agent=false
73 install_plugins=true
74 version_arg=""
@@ -124,6 +119,11 @@ case $platform in
119 ;;
120 esac
121
122 +# --- Prerequisites ---
123 +
124 +command -v curl >/dev/null || error 'curl is required to install Composio CLI'
125 +command -v unzip >/dev/null || error 'unzip is required to install Composio CLI'
126 +
127 case $platform in
128 'Darwin x86_64') target=darwin-x64 ;;
129 'Darwin arm64') target=darwin-aarch64 ;;
test/install-sh-release-resolution.test.sh
+69
@@ -11,6 +11,75 @@ home_dir="$tmpdir/home"
11 install_dir="$tmpdir/install"
12 mkdir -p "$bin_dir" "$home_dir" "$install_dir"
13
14 +windows_bin_dir="$tmpdir/windows-bin"
15 +mkdir -p "$windows_bin_dir"
16 +cat > "$windows_bin_dir/uname" <<'EOF'
17 +#!/bin/sh
18 +printf '%s\n' 'MINGW64_NT-10.0 x86_64'
19 +EOF
20 +chmod +x "$windows_bin_dir/uname"
21 +
22 +bash_bin=$(command -v bash)
23 +run_windows_installer() {
24 + env PATH="$windows_bin_dir" HOME="$home_dir" "$bash_bin" "$repo_root/install.sh" "$@"
25 +}
26 +
27 +if ! windows_help_output=$(run_windows_installer --help 2>&1); then
28 + echo 'Expected install.sh --help to succeed before platform and prerequisite checks.' >&2
29 + printf '%s\n' "$windows_help_output" >&2
30 + exit 1
31 +fi
32 +if ! grep -q '^Usage: install.sh' <<<"$windows_help_output"; then
33 + echo 'Expected install.sh --help to print usage on Windows-like platforms.' >&2
34 + printf '%s\n' "$windows_help_output" >&2
35 + exit 1
36 +fi
37 +
38 +if invalid_option_output=$(run_windows_installer --invalid-option 2>&1); then
39 + echo 'Expected install.sh to reject an unknown option before platform checks.' >&2
40 + exit 1
41 +fi
42 +if ! grep -q 'Unknown option: --invalid-option' <<<"$invalid_option_output"; then
43 + echo 'Expected the unknown-option error on Windows-like platforms.' >&2
44 + printf '%s\n' "$invalid_option_output" >&2
45 + exit 1
46 +fi
47 +if grep -Eq 'Windows is not supported|(curl|unzip) is required to install Composio CLI' <<<"$invalid_option_output"; then
48 + echo 'Expected argument validation to take precedence over platform and prerequisite errors.' >&2
49 + printf '%s\n' "$invalid_option_output" >&2
50 + exit 1
51 +fi
52 +
53 +if excess_arguments_output=$(run_windows_installer first-version second-version 2>&1); then
54 + echo 'Expected install.sh to reject excess positional arguments before platform checks.' >&2
55 + exit 1
56 +fi
57 +if ! grep -q 'Too many arguments' <<<"$excess_arguments_output"; then
58 + echo 'Expected the excess-arguments error on Windows-like platforms.' >&2
59 + printf '%s\n' "$excess_arguments_output" >&2
60 + exit 1
61 +fi
62 +if grep -Eq 'Windows is not supported|(curl|unzip) is required to install Composio CLI' <<<"$excess_arguments_output"; then
63 + echo 'Expected argument validation to take precedence over platform and prerequisite errors.' >&2
64 + printf '%s\n' "$excess_arguments_output" >&2
65 + exit 1
66 +fi
67 +
68 +if windows_output=$(run_windows_installer 2>&1); then
69 + echo 'Expected install.sh to reject Windows-like platforms.' >&2
70 + exit 1
71 +fi
72 +if ! grep -q 'Windows is not supported. Please use WSL' <<<"$windows_output"; then
73 + echo 'Expected Windows-to-WSL guidance when installer prerequisites are missing.' >&2
74 + printf '%s\n' "$windows_output" >&2
75 + exit 1
76 +fi
77 +if grep -Eq '(curl|unzip) is required to install Composio CLI' <<<"$windows_output"; then
78 + echo 'Expected Windows-to-WSL guidance to take precedence over prerequisite errors.' >&2
79 + printf '%s\n' "$windows_output" >&2
80 + exit 1
81 +fi
82 +
83 platform=$(uname -ms)
84 case $platform in
85 'Darwin x86_64') target=darwin-x64 ;;