Repository navigation
Conversation
Replace the legacy hook and system_command with postflight_steps and run. Expand the application directory at install time with the appdir token. Preserve xattr arguments, unprivileged execution and failure handling.
josericardo-fo
approved these changes
Sep 15, 2026
|
I verified this locally on Homebrew 7.0.7 using a throwaway local tap:
It also works with the release automation. LGTM from a downstream user. It fixes chattymin/PokeTokenBar#385. |
|
Still seeing the |
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.
Summary
Homebrew prints a deprecation warning whenever it loads the
poke-token-barcask. Migrate its post-install hook to the structuredpostflight_stepsDSL, usingrunand the deferred{{appdir}}token so the existing/usr/bin/xattr -crcommand targets the configured application directory at installation time.The command arguments, unprivileged execution and failure handling are preserved. Also remove an extra blank line and add the missing final newline flagged by
brew style.Related to #1: renaming the stanza alone fails to load on Homebrew 7.0.1-15-g82ea9cb with
undefined local variable or method 'appdir' for an instance of Homebrew::InstallSteps::DSL. The block also needsrunin place of the legacysystem_commandhelper.Reference: Homebrew's structured flight steps and interpolation documentation.
Validation
Cask::CaskLoader::FromContentLoader: no deprecation warning./usr/bin/xattr,-cr, default/Applicationsand a custom application directory containing a space,sudo: false, and fail-on-error behavior. No application installation or realxattrcommand was performed.brew style Casks/poke-token-bar.rb: the install-step offense is resolved; two pre-existing offenses remain (Homebrew/OSDependsOnandCask/ArrayAlphabetization). The original cask has five offenses; this patch introduces none.git diff --check: passed.