Conversation
…etions (CLI-1A5) installCompletions now catches EPERM, EACCES, and EROFS filesystem errors and returns null instead of throwing. This prevents noisy Sentry reports when the completion target directory is not writable (common on macOS with SIP-protected paths or during Homebrew post-install).
Contributor
|
The setup test expected bestEffort to catch the EPERM error, but now installCompletions handles it internally and returns null. Update the test to verify setup completes without error messages.
Contributor
Codecov Results 📊✅ 6215 passed | Total: 6215 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 66.67%. Project has 12867 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.90% 76.09% +0.19%
==========================================
Files 293 293 —
Lines 53943 53822 -121
Branches 0 0 —
==========================================
+ Hits 40947 40955 +8
- Misses 12996 12867 -129
- Partials 0 0 —Generated by Codecov Action |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 39bc7ec. Configure here.
…rmission errors When installCompletions returns null for a supported shell (bash/zsh/fish) due to permission errors, don't fall through to tryBashCompletionFallback which would misleadingly say 'Your shell (zsh) is not directly supported'. Skip the fallback for all shells with native completion support. Addresses Cursor Bugbot review comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
installCompletionsnow catchesEPERM,EACCES, andEROFSfilesystem errors and returnsnullinstead of throwing~/.local/share/zshmay be protected by SIP or owned by root, and during Homebrew post-install with restrictive permissionsChanges
src/lib/completions.ts: Wrap themkdirSync+Bun.writecalls in a try/catch that detects permission error codes and returnsnullgracefullytest/lib/completions.test.ts: Add tests for EACCES and EPERM scenarios usingchmodSyncto simulate restricted directoriesFixes https://sentry.sentry.io/issues/7423432325/