wezterm@nightly: fix install on case-insensitive filesystems#276451
Open
1995parham wants to merge 1 commit into
Open
wezterm@nightly: fix install on case-insensitive filesystems#2764511995parham wants to merge 1 commit into
1995parham wants to merge 1 commit into
Conversation
9 tasks
Author
|
CI summary for maintainers:
That audit failure is pre-existing and unrelated to this one-line change: Happy to adjust if you'd prefer a different approach. |
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.
Problem
brew install --cask wezterm@nightlyfails on case-insensitive filesystems (the macOS default, e.g. non-case-sensitive APFS):Cause
#0e23e31ac ("wezterm@nightly: migrate flight removals") replaced the previous duplicate-tolerant
preflight do … .glob([...]).firstwith amovestep:The
movestep resolves its source withPathname.globand requires exactly one match (Cask::Artifact→install_steps.rb#resolve_step_source). The nightly zip extracts to a single folder,WezTerm-macos-<date>/. On a case-insensitive filesystem both brace alternatives match that one folder:WezTerm-*/WezTerm.app→ matcheswezterm-*/WezTerm.app→ also matches the same folder (case-insensitive)so the glob returns the path twice (length
2≠1) and the step aborts. The old.firstform silently tolerated the duplicate; the strictmoveform does not.Fix
The macOS nightly artifact is always named
WezTerm-macos-*(capitalised), so one glob alternative matches exactly once on both case-insensitive and case-sensitive filesystems; the lowercasewezterm-*alternative was redundant.Testing
brew style— no offenses.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask wezterm@nightly(via a local tap carrying this change) installs cleanly on non-case-sensitive APFS;wezterm --version→20260716-195552-76b606ec; all four binaries link.brew audit --cask --onlinestill reportsNo binaries in App+ anindex 0 outside of array boundsexception, but this is pre-existing and unrelated to this change:brew audit'sextract_artifactsunpacks the zip without runningpreflight_steps, so it looks forWezTerm.appat the staged root while the app is still insideWezTerm-macos-*/. I reproduced the identical audit failure against the unchangedmaincontent (brace-glob version), so this PR neither introduces nor is able to fix it.After making any changes to a cask, existing or new, verify:
brew audit --cask --online <cask>is error-free.brew style --fix <cask>reports no offenses.Additionally, if adding a new cask:
brew audit --cask --new <cask>worked successfully.HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask>worked successfully.brew uninstall --cask <cask>worked successfully.zapstanza paths.AI usage: Claude (Claude Code) diagnosed the root cause and drafted the one-line change. Every claim was verified manually by me:
WezTerm-macos-*folder (soPathname.globreturns two identical paths → themovestep's "exactly one path" check fails).brew style(clean) and installed from a local tap with the change;wezterm --versionruns and all binaries link.brew auditerrors are pre-existing by reproducing them against the unchangedmaincontent.zapstanza: the app'sCFBundleIdentifieriscom.github.wez.wezterm, so the existing~/Library/Saved Application State/com.github.wez.wezterm.savedStatepath is correct (thezapstanza is unchanged by this PR).