Repository navigation
Report permission errors from bundle clean - #9772
Merged
hsbt merged 6 commits intoNov 9, 2026
Merged
Conversation
Member
|
I pushed four commits on top of yours. |
FileUtils.rm_rf ignored a directory another process had already deleted, but rm_r raises ENOENT, which reached the user as an unexpected error report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Raising on the first failure left later gem directories, gemspecs and binstubs behind, so the gemspec of a gem whose directory was already removed stayed installed. Now everything removable is removed, only those paths are reported as removed, and the rest are listed together before exiting with an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They were still removed with FileUtils.rm_rf, which ignores the same permission errors that unused gem directories now report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the clean setting enabled, a gem that could not be removed made a successful bundle install or bundle update exit with an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prune setting was skipped once clean raised, though everything removable is gone by then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hsbt
force-pushed
the
agent/issue-9396-clean-permission-errors
branch
from
October 30, 2026 08:37
91a2b38 to
afe037f
Compare
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.
What was the end-user or developer problem that led to this PR?
bundle cleancould report that it removed an unused gem and exit successfully even when filesystem permissions prevented deletion. That left files behind without telling the user which paths needed attention.Fixes #9396.
What is your fix for the problem, implemented in this PR?
bundle cleanremoves the paths it can, runs the configured cache pruning, and reports filesystem access failures together with exit status 44. This covers unused gem directories and files, Git caches, and extension directories. If a path disappeared after the scan, it counts as already removed.When cleaning runs as part of a successful
bundle installorbundle update, Bundler reports leftover paths as a warning and preserves the install or update result.Verification
afe037fb.Make sure the following tasks are checked
AI disclosure: I used an AI coding assistant to investigate the issue, implement the initial patch, and run its local checks. Follow-up commits from
hsbtextend the behavior and regression coverage described above.