Skip to content

install steps: add {{arch}} template token - #23836

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-steps-arch-token
Sep 6, 2026
Merged

install steps: add {{arch}} template token#23836
MikeMcQuaid merged 1 commit into
mainfrom
install-steps-arch-token

Conversation

@daeho-ro

@daeho-ro daeho-ro commented Sep 6, 2026

Copy link
Copy Markdown
Member

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI-assisted: Claude Opus 5 drafted the patch, the tests and the documentation, and ran brew lgtm and the reproduction below on macOS 26 arm64. I reviewed its output and will answer review comments myself.


Resolves https://github.com/orgs/Homebrew/discussions/7055.

The deprecated postflight block delegated arch to the cask, but postflight_steps has no equivalent, so a cask whose artefact name embeds the architecture has to duplicate every step across on_arm and on_intel after migrating. {{arch}} now expands to the value the cask's arch stanza selected, and to an empty string when nothing matches, as postflight did. A context without an arch, such as a formula, leaves the token verbatim.

- the deprecated `postflight` block exposed the cask's `arch`, but
  its `postflight_steps` replacement did not, so migrating casks
  had to duplicate steps in `on_arm` and `on_intel` blocks
- expand `{{arch}}` to the value the cask's `arch` stanza selected,
  and to an empty string when no value matches, as `postflight` did
- leave `{{arch}}` verbatim for contexts without an `arch`
- fix the step path corrector wrapping allowed template helpers in
  a second `#{}`, which autocorrected to `"#{#{arch}}"`
Copilot AI balanced review requested due to automatic review settings September 6, 2026 05:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 6, 2026
Merged via the queue into main with commit 043898d Sep 6, 2026
52 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-steps-arch-token branch September 6, 2026 08:39
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