-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Fix brew fetch failure with symlinked taps and refactor path validation logic #20655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot address review comments and also DRY/simplify/YAGNI things as much as possible.
Addressed all review comments by matching formulary.rb pattern, consolidating tests into main file, using Pathname methods, and applying DRY/YAGNI principles. Removed duplicate code and simplified the implementation. (4f61380) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Follow instructions, run brew style --fix and brew typecheck and fix all errors.
Fixed all style and type issues. Removed |
1f1ed48 to
14b84ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Formulae, dependencies, tries are all used in multiple places so let's simplify them
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
14b84ed to
6297f98
Compare
typed: strictfrom test file (tests should never be typed: strict)mktmpdirhelper instead of custom tmpdir setupRefactoring Changes
The duplicate path validation logic that existed in both
cask_loader.rbandformulary.rbhas been extracted into a new shared methodUtils::Path.validate_package_pathinutils/path.rb. This refactoring:The shared method handles validation for both casks and formulae with appropriate error messages while preserving all the original security checks and tap detection logic.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.