Add curl cmd as mac fallback installation method#419
Conversation
WalkthroughThe install script for macOS has been updated to directly execute a curl command for installing the Agentuity CLI when Homebrew is unavailable. The script now includes explicit error handling: it aborts with a message if the curl command fails, and calls a success function upon successful installation. Changes
Poem
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
install.sh (1)
238-240: Consider hardening the cURL invocation for security & reliability.
- Pin the protocol and TLS version to avoid downgrade/mitM:
"$CURL" --proto '=https' --tlsv1.2 -fsSL …- Verify the fetched script (GPG sig / checksum) before piping to
sh. Blind execution from the network is risky.No immediate breakage, but worth addressing.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
install.sh(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test CLI Upgrade Path (windows-latest)
- GitHub Check: Analyze (go)
| if ! "$CURL" -fsSL https://agentuity.sh | sh; then | ||
| abort "cURL installation failed. Please check your connection or try --no-brew again." | ||
| fi |
There was a problem hiding this comment.
Pipeline can silently succeed even when curl fails – add set -o pipefail.
Without pipefail, the exit status of the pipeline is that of sh, not curl.
If curl fails (e.g., network error, 404), sh happily consumes nothing and exits 0, so the abort branch is never taken.
@@
-set -e
+# Abort on errors *and* on any component of a pipe failing
+set -e
+set -o pipefailCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In install.sh around lines 238 to 240, the pipeline using curl and sh can
silently succeed if curl fails because the exit status reflects sh's success,
not curl's. To fix this, add 'set -o pipefail' before the pipeline command to
ensure the script detects failures in any part of the pipeline, causing the
abort branch to trigger correctly on curl errors.
It looks like we meant to call curl after this echo. Maybe I am missing something tho
Summary by CodeRabbit
Bug Fixes
Chores