94392d0307 added this warning to the Ruby command, but bare listings are
normally served by the Bash fast path, which returns before the Ruby
command loads - so the warning never fired for the plain brew list
--cask invocations it was written for. Emit the same warning from
list.sh, and point the Bash list test's HOMEBREW_LIBRARY at the
production-shaped Library directory so the fast path can source utils.sh
for opoo the way a real brew does.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The runtime DSL already supports scoped guards, template identifiers and
`move_contents`, but the validator rejects them. This blocks incremental
tap migrations which use those existing APIs.
- validate nested platform and path guard blocks recursively
- allow formula and cask identifiers in serialised step strings
- accept `move_contents` in formula and cask step blocks
- continue rejecting arbitrary Ruby inside nested scopes
The bare cask listing is ls(1) of the Caskroom directory, so a broken
symlink there (e.g. a dangling cask rename alias) lists exactly like an
installed cask while loading and uninstalling it fail. brew cleanup has
removed such symlinks since 3ddc196f11, but until it runs the listing
misleads with no hint of the problem, and when broken symlinks are the
only Caskroom entries the listing prints nothing at all while brew
uninstall of the listed name errors. Warn on stderr, naming the broken
symlinks and pointing at brew cleanup, without changing stdout output.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cask renames leave an alias symlink in the Caskroom (today old token ->
new directory; an earlier migration era created the inverse
arrangement). Uninstall removed only broken symlinks named after the
cask's declared old_tokens, so any other arrangement - uninstalling by
the old token, or an alias left by the earlier era - left a dangling
symlink behind: brew list --cask still showed the name while
brew uninstall of it failed with "Cask ... is not installed". Scan the
Caskroom for broken symlinks pointing at the removed directory instead,
whichever of the linked names was uninstalled, and clean up on the
purge_caskroom_path force path too.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Avoid probing quarantine metadata when support is unavailable.
- Keep quarantine propagation unchanged on supported systems.
- Cover unsupported artifact extraction with a regression test.
Fixes#23226
Cask syntax needs the same current and stable Homebrew coverage as core
without duplicating matrix construction in the tap workflow.
- rename generated syntax jobs to `tap_syntax`
- add a stable row using the same selected runner
- retain both rows for `ci-syntax-only` pull requests
- enforce GitHub's job limit on the complete generated matrix
- skip redundant tap audit work in the stable row
Several tap hooks only substitute install-time paths in generated files
and do not need arbitrary Ruby execution.
- expose the familiar `inreplace` name and option defaults
- serialise literal substitutions, regular expressions and their flags
- accept regexp literals in formula and cask step validators
- expand only fixed install-time template tokens
- share validation and execution between formulae and casks
`brew fetch sonarqube-cli --arch=intel` fails with a confusing
`curl: (22) ... 403` because the cask builds its URL from the `arch`
stanza and has a single `sha256` inside `on_macos`, so under an arch
the cask doesn't support both still resolve and it attempts to fetch a
URL that doesn't exist upstream.
This will skip an os/arch combination when the loaded cask's
`depends_on.arch` excludes that architecture, reusing the existing
"not supported" warning:
$ brew fetch --cask sonarqube-cli --arch=intel
Warning: Cask sonarqube-cli is not supported on os golden_gate and arch intel
Adds a `depends-on-arch-arm64` test cask replicating the behavior
and a `#cask_downloads` spec covering the skip.