Skip to content

fix: make clean fails on write-protected binaries in ./bin - #26

Merged
dermorz merged 1 commit into
mainfrom
fix/make-clean-bin-permissions
Aug 20, 2026
Merged

fix: make clean fails on write-protected binaries in ./bin#26
dermorz merged 1 commit into
mainfrom
fix/make-clean-bin-permissions

Conversation

@dermorz

@dermorz dermorz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What

Make make clean able to delete $(LOCALBIN) when it contains write-protected binaries.

Why

Binaries installed into ./bin (e.g. via go install) end up mode r-xr-xr-x, so rm -rf $(LOCALBIN) fails with "Permission denied" and make clean errors out. Adding chmod -R u+w before the rm restores write permission on the directory entries first. The - prefix keeps clean working when ./bin doesn't exist.

Testing

Manual: make <tool-target> to populate ./bin, then make clean — succeeds now, failed before. Also verified make clean is a no-op on a tree without ./bin.

Checklist

  • Tests added/updated n/a
  • No breaking changes (or upgrade path documented above)
  • Readable commit history (squashed and cleaned up as desired)
  • AI code review considered and comments resolved

Summary by CodeRabbit

  • Bug Fixes
    • Improved cleanup reliability by ensuring locally generated files can be removed successfully.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e6a734f-cd6a-48b2-ad9f-2123493d9d9e

📥 Commits

Reviewing files that changed from the base of the PR and between 8cb6197 and abff2c0.

📒 Files selected for processing (1)
  • common.mk

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The clean target now adds user write permission to $(LOCALBIN) before it removes the directory.

Changes

Local binary cleanup

Layer / File(s) Summary
Permission adjustment before cleanup
common.mk
The clean recipe recursively adds user write permission to $(LOCALBIN) before deleting it.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to abff2

This localized change updates cleanup behavior for write-protected binaries and is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: olzemal

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix for make clean failures caused by write-protected binaries in ./bin.
Description check ✅ Passed The description covers the change, motivation, testing, and checklist; the missing issue link and unchecked AI review item are minor gaps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/make-clean-bin-permissions

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dermorz
dermorz merged commit f16fb83 into main Aug 20, 2026
7 checks passed
@dermorz
dermorz deleted the fix/make-clean-bin-permissions branch August 20, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants