fix(auto-updater): fix arithmetic operation failure with set -e - #201
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA small change prevents a bash script from exiting under Changes
Sequence Diagram(s)(omitted — changes are small bug-fix + tests; no new multi-component control flow to visualize) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 |
The script was failing after the first plugin installation due to ((success_count++)) and ((failed_count++)) arithmetic operations being treated as failures under set -euo pipefail. Added || true to these operations to prevent premature script exit. Co-Authored-By: Claude <noreply@anthropic.com>
6937902 to
66d2499
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/update-all-plugins.bats`:
- Around line 37-40: The curl mock in tests/update-all-plugins.bats currently
ignores `-o` and just cats $mock_marketplace to stdout; change the mock curl
function to detect when `-o <file>` (or `--output <file>`) is passed and write
the contents of $mock_marketplace into that target file (fall back to stdout
when no output flag present), so update the inline curl() { ... } mock to parse
args and redirect the mock JSON into the requested output file while preserving
other flags/behavior.
Summary
update-all-plugins.shscript failing after first plugin installation((success_count++))and((failed_count++))treated as failures underset -euo pipefail|| trueto arithmetic operations to prevent premature exitTest plan
update-all-plugins.shscript completes successfully🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.