Allow formula permission steps (8/24) - #23185
Merged
Merged
Conversation
MikeMcQuaid
force-pushed
the
install-step-07-cask-generated-scripts
branch
2 times, most recently
from
July 20, 2026 07:22
a56f984 to
43c589b
Compare
MikeMcQuaid
force-pushed
the
install-step-08-formula-permissions
branch
from
July 20, 2026 07:22
3aa531a to
6d02e59
Compare
MikeMcQuaid
force-pushed
the
install-step-07-cask-generated-scripts
branch
from
July 21, 2026 07:13
43c589b to
704d977
Compare
MikeMcQuaid
force-pushed
the
install-step-08-formula-permissions
branch
from
July 21, 2026 07:14
6d02e59 to
a689849
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the formula-side declarative install steps DSL to permit set_permissions in post_install_steps, aligning it with existing permission-step capabilities already available in cask steps, and documents the formula usage in the Formula Cookbook.
Changes:
- Allow
set_permissionsas an accepted DSL call inside formula*_stepsblocks in the InstallSteps RuboCop helper. - Extend the RuboCop spec coverage to treat
set_permissionsas valid in formula step blocks and to include it in the allowed-methods error message. - Document
set_permissionsas an available formula file-preparation step in the Formula Cookbook.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Library/Homebrew/test/rubocops/install_steps_spec.rb | Updates RuboCop cop specs to include set_permissions in the allowed step DSL list and adds a no-offense example using it. |
| Library/Homebrew/rubocops/shared/install_steps_helper.rb | Adds :set_permissions to the formula ALLOWED_STEP_METHODS list used by the RuboCop cop. |
| docs/Formula-Cookbook.md | Documents set_permissions as an available declarative step for formulae. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
force-pushed
the
install-step-07-cask-generated-scripts
branch
from
July 21, 2026 12:02
704d977 to
2c35459
Compare
MikeMcQuaid
force-pushed
the
install-step-08-formula-permissions
branch
from
July 21, 2026 12:02
a689849 to
9ad0321
Compare
MikeMcQuaid
force-pushed
the
install-step-07-cask-generated-scripts
branch
from
July 21, 2026 13:03
2c35459 to
eeaae4a
Compare
MikeMcQuaid
force-pushed
the
install-step-08-formula-permissions
branch
from
July 25, 2026 06:38
9ad0321 to
d049aac
Compare
MikeMcQuaid
marked this pull request as ready for review
July 25, 2026 18:25
MikeMcQuaid
enabled auto-merge
July 25, 2026 18:27
Three core formulae adjust modes on persistent paths after installation but do not need ownership changes or arbitrary Ruby. - admit the existing `set_permissions` step in formula blocks - keep `set_ownership` limited to cask blocks - document and audit the formula capability explicitly
MikeMcQuaid
force-pushed
the
install-step-08-formula-permissions
branch
from
July 25, 2026 19:07
d049aac to
677dad2
Compare
p-linnane
approved these changes
Jul 26, 2026
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.
Three core formulae adjust modes on persistent paths after installation
but do not need ownership changes or arbitrary Ruby.
set_permissionsstep in formula blocksset_ownershiplimited to cask blocksAI disclosure: using OpenAI Codex 5.6 Sol max with local review and
testing.