fix: resolve Homebrew install failures and improve setup.sh error handling#146
fix: resolve Homebrew install failures and improve setup.sh error handling#146marcusquinn merged 1 commit intomainfrom
Conversation
…dling - Fix Homebrew formula double-write bug: install aidevops.sh to libexec instead of bin to avoid 'Will not overwrite' error when wrapper is created - Add source directory validation in deploy_aidevops_agents() to catch curl installs run from wrong directory with clear error message - Add Python upgrade instructions when 3.10+ not found for AI orchestration - Show actual error output when dev-browser setup fails instead of silent failure - Show pip error output when DSPy dependency install fails for debugging Fixes installation issues reported in user session where: - brew install failed with 'RuntimeError: Will not overwrite' - curl install from non-aidevops directory caused rsync errors - Missing dependencies had no actionable upgrade instructions
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the robustness and user-friendliness of the installation and setup process. It addresses critical installation failures, particularly with Homebrew and Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughThe PR relocates the CLI script installation from bin to libexec in the Homebrew formula while introducing a wrapper script in bin, and enhances setup.sh with comprehensive error handling, pre-checks, and user-facing guidance for common failure scenarios. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses several critical installation and error handling issues, significantly improving the robustness and user experience of the AI DevOps Framework. The Homebrew formula fix correctly resolves the double-write conflict by installing aidevops.sh to libexec, preventing installation failures. The enhanced error handling in setup.sh for deploy_aidevops_agents(), DSPy dependency installation, and dev-browser setup provides much clearer and actionable feedback to the user, which will greatly aid in debugging and self-resolution. Additionally, the detailed Python upgrade and installation instructions are a valuable addition for users encountering version compatibility issues. Overall, these changes are well-implemented and directly tackle reported problems, making the setup process more reliable and user-friendly.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 21 17:03:08 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🤖 Augment PR SummarySummary: This PR fixes installer reliability issues, especially around Homebrew installs and debugging failed setup steps. Changes:
Technical Notes: The updated setup paths and captured stderr output should make installation failures easier to diagnose without changing core setup behavior. 🤖 Was this summary useful? React with 👍 or 👎 |
| # Install the CLI script | ||
| bin.install "aidevops.sh" => "aidevops" | ||
| # Install the CLI script to libexec (not bin, to avoid double-write conflict) | ||
| libexec.install "aidevops.sh" |
There was a problem hiding this comment.
Installing aidevops.sh into libexec means the wrapper later execs it directly; if the script doesn’t have the executable bit in the tarball, the wrapper will fail at runtime with Permission denied. Worth double-checking that the packaged aidevops.sh is always installed with executable permissions in this new location.
🤖 Was this useful? React with 👍 or 👎
| # Validate source directory exists (catches curl install from wrong directory) | ||
| if [[ ! -d "$source_dir" ]]; then | ||
| print_error "Agent source directory not found: $source_dir" | ||
| print_info "This usually means setup.sh was run from the wrong directory." |
There was a problem hiding this comment.
This new “wrong directory” error path will also trigger in cases where .agent isn’t located at $script_dir/.agent (e.g., packaged installs where the agent files live elsewhere), so the remediation guidance (cd ~/Git/aidevops ...) may be misleading. Consider clarifying the message to distinguish “curl/clone re-exec didn’t happen” vs “install layout doesn’t have .agent next to setup.sh."
🤖 Was this useful? React with 👍 or 👎
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
homebrew/aidevops.rb (1)
18-33: Make the bin wrapper executable.
(bin/"aidevops").writecreates a non-executable file by default, so the CLI will fail with "permission denied." Addchmod 0755after writing, or use the Homebrew helperbin.write_exec_script(preferred) which handles this automatically.🔧 Proposed fix (Option 1: chmod)
(bin/"aidevops").write <<~EOS #!/usr/bin/env bash export AIDEVOPS_SHARE="#{share}/aidevops" exec "#{libexec}/aidevops.sh" "$@" EOS + (bin/"aidevops").chmod 0755🔧 Proposed fix (Option 2: Homebrew helper – recommended)
libexec.install "aidevops.sh" libexec.install "setup.sh" (share/"aidevops").install ".agent" (share/"aidevops").install "VERSION" - (bin/"aidevops").write <<~EOS - #!/usr/bin/env bash - export AIDEVOPS_SHARE="#{share}/aidevops" - exec "#{libexec}/aidevops.sh" "$@" - EOS + bin.write_exec_script("aidevops", libexec/"aidevops.sh", {"AIDEVOPS_SHARE" => "#{share}/aidevops"})



Summary
Fixes installation issues reported in user session where Homebrew install failed and curl install from wrong directory caused errors.
Changes
aidevops.shtolibexecinstead ofbinto avoid "Will not overwrite" error when the wrapper script is createddeploy_aidevops_agents()to catch curl installs run from wrong directory with clear error messageRoot Cause Analysis
Homebrew Double-Write Bug
The formula was writing to
bin/aidevopstwice:bin.install "aidevops.sh" => "aidevops"(bin/"aidevops").write <<~EOSThis caused
RuntimeError: Will not overwriteeven on fresh installs.Curl Install from Wrong Directory
When running
bash <(curl -fsSL https://aidevops.sh/install)from a non-aidevops directory, the bootstrap function clones the repo but the rsync command still used the originalBASH_SOURCE[0]path, causing:Testing
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.