brew-cask: Homebrew's cask metadata migration (command_wrapper artifacts, run flight steps) breaks previously-working casks #11462
Unanswered
bauffman
asked this question in
Troubleshooting and bug reports
Replies: 1 comment
|
Thanks for the detailed report and examples. I opened #11472 to add support for both metadata migrations: The implementation also preserves runtime variables in literal wrappers and validates command paths and wrapper metadata before installation. The focused cask suite passes with 97 tests, and the repository lint/check workflow passes. The PR is ready for review: #11472 AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
brew-cask:package installs fail hard when the cask uses Homebrew's new structured metadata:This aborts the whole
mise bootstraprun, even when the cask is already installed —"latest"re-fetches and re-parses the cask JSON every run, so previously-working configs broke overnight with no config change.Why this started happening
Homebrew added a
command_wrappercask artifact in Homebrew/brew#23183 (merged 2026-07-21, refined in #23296 / #23308), and started migrating casks in homebrew/cask on 2026-07-29. As of this morning, 62 casks have been migrated tocommand_wrapper("<token>: migrate command wrappers.") and 24 casks to structuredrunflight steps ("<token>: migrate flight commands."), including popular ones like firefox, vlc, obs, orbstack, and the JetBrains IDEs — and the migration appears to be ongoing.Example — the firefox cask now ships:
{ "command_wrapper": [ "firefox", { "executable": "$APPDIR/Firefox.app/Contents/MacOS/firefox" } ], "target": "$HOMEBREW_PREFIX/bin/firefox" }and orbstack's postflight is now:
{ "postflight_steps": [ { "steps": [ { "type": "run", "command": { "base": "appdir", "path": "OrbStack.app/Contents/MacOS/bin/orbctl" }, "args": ["_internal", "brew-postflight"] } ] } ] }Where it fails
cask_artifacts()insrc/system/packages/brew/cask.rsbails on any artifact type it doesn't recognize,command_wrapperisn't inis_non_install_artifact()'s ignore list, andparse_flight_stepsonly supportsmove/removestep types. Per the docs this fail-hard behavior is intentional (no delegation to real brew), so this is a request to support the new metadata rather than a parsing bug.command_wrappershould be close to the existingbinaryartifact: instead of symlinking a staged file, brew writes a small wrapper script attargetthat execs the declared executable (with optional args), so app bundles can expose a CLI without the old symlink-into-app approach.To Reproduce
(or
brew-cask:orbstackfor the flight-step variant)Expected behavior
Casks using
command_wrapperartifacts andrunflight steps install successfully — or at minimum, an unsupported artifact on an already-installed, up-to-date cask doesn't abort the whole bootstrap.mise doctor output
Also checked
src/system/packages/brew/cask.rson currentmain(post-v2026.7.16): neither metadata type is handled there yet.Workaround for anyone else hitting this
Move affected casks out of
[bootstrap.packages]into a hook using real brew:All reactions