Skip to content

fix(brew): use postflight_steps so the cask stops warning on upgrade - #182

Merged
momenbasel merged 1 commit into
mainfrom
fix/cask-postflight-steps
Oct 8, 2026
Merged

momenbasel merged 1 commit into
mainfrom
fix/cask-postflight-steps

Conversation

@momenbasel

@momenbasel momenbasel commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Homebrew 7 deprecates the postflight block (cask/dsl.rb calls odeprecated
for every ARTIFACT_BLOCK_CLASSES key). The steps DSL has no appdir method,
so the block is rewritten with run and the {{appdir}} template token
that install_steps.rb expands inside args. Loads through
Cask::CaskLoader::FromPathLoader as App,PostflightSteps,Zap with no warning.

Supersedes #166 by @quirico: the stanza rename there was right, but the unchanged
#{appdir} interpolation raises NameError inside the steps DSL and makes
the cask unreadable.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Homebrew 7 deprecates the postflight block (cask/dsl.rb calls odeprecated
for every ARTIFACT_BLOCK_CLASSES key). The steps DSL has no appdir method,
so the block is rewritten with `run` and the `{{appdir}}` template token
that install_steps.rb expands inside args. Loads through
Cask::CaskLoader::FromPathLoader as App,PostflightSteps,Zap with no warning.

Supersedes #166 by @quirico: the stanza rename there was right, but the unchanged
`#{appdir}` interpolation raises NameError inside the steps DSL and makes
the cask unreadable.
@momenbasel
momenbasel force-pushed the fix/cask-postflight-steps branch from 9b4e598 to f5e4a54 Compare October 8, 2026 01:05
@momenbasel
momenbasel merged commit da267f0 into main Oct 8, 2026
7 checks passed
momenbasel added a commit to momenbasel/homebrew-tap that referenced this pull request Oct 8, 2026
Homebrew 7 deprecates the postflight block. The steps DSL has no appdir
method, so the block uses run with the {{appdir}} template token that
install_steps.rb expands inside args. Mirrors momenbasel/PureMac#182.
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.

2 participants