Anywhere we can use `blob/master` we can use `blob/HEAD` instead. This
will make life easier if we ever rename our default branch in future
(once/if Git and GitHub provides the necessary tooling to do so).
- Depending on context, I've gone for either "denylist" or "disallow"
here. "Disallow" for things in sentences, or actions, and "denylist"
for list of things.
This is useful for applications that are not signed by the developer and
require Accessibility access.
Because the app is not signed, macOS only authorizes the current binary,
and so when it is updated (and the binary changes) the new version is
unsigned, despite the app still showing as ticked in System Preferences.
The user has to manually untick and retick the app each time.
The ideal fix is for the developer to sign their app, but not all
developers are willing to pay for this, so the best we can do is to
advise users of the workaround/solution.
Refs: https://github.com/Homebrew/homebrew-cask/pull/83157
This ensures that dependencies are verified and tapped before they are
fetched. `FormulaInstaller#lock` has been moved into
`FormulaInstaller#install` to avoid locking until necessary.
While we're here, don't compute dependencies before fetching if we're
not going to use them.
This commit fixes the PR #7417 bug.
The call to `canonicalize` needs to wrap `DEFAULT_DIRS`, not the
other way around. This was mixed up in PR #7417 due to an oversight.
Previously, the JSON-based cask config loader was untested.
This commit changes the interface to accept a string, making the loader
easier to test. The commit also adds a test.
This commit fixes an issue where we added a new global artifact
and then updated a cask to make use of that new artifact.
This caused a number of `brew cask` commands to fail for users
who had the cask installed before the artifact was added.
When loading the definition of an installed cask, we configure it
using a snapshot from install time, e. g. `/usr/local/Caskroom/markdownmdimporter/.metadata/config.json`.
The snapshot looks like this:
```
{
"default": {
"appdir": "/Applications",
"prefpanedir": "/Users/claudia/Library/PreferencePanes",
"qlplugindir": "/Users/claudia/Library/QuickLook",
"dictionarydir": "/Users/claudia/Library/Dictionaries",
"fontdir": "/Users/claudia/Library/Fonts",
"colorpickerdir": "/Users/claudia/Library/ColorPickers",
"servicedir": "/Users/claudia/Library/Services",
"input_methoddir": "/Users/claudia/Library/Input Methods",
"internet_plugindir": "/Users/claudia/Library/Internet Plug-Ins",
"audio_unit_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/Components",
"vst_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/VST",
"vst3_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/VST3",
"screen_saverdir": "/Users/claudia/Library/Screen Savers"
},
"env": {},
"explicit": {}
}
```
Note that there is no `mdimporterdir` because the cask was installed
before the artifact was added.
The root cause is that the cask loading code still expects the snapshot
to contain directory configuration for all artifact types.
Since the snapshot never learned about the new artifact type, cask
loading would fail.
The fix applied in this commit is to fall back to the global default
whenever the `default` directory map of a configuration snapshot is
incomplete.
See also:
- https://github.com/Homebrew/brew/pull/7286#issuecomment-613376568
- https://discourse.brew.sh/t/cask-definition-is-invalid-invalid-mdimporter-stanza-key-not-found-mdimporterdir