1166 Commits

Author SHA1 Message Date
Mike McQuaid
ac0665daff
Refer to default branch in links with HEAD
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).
2020-06-25 11:38:40 +01:00
William Ma
36520b0a9d cache: fix bug when calling class method 2020-06-22 11:29:46 -04:00
William Ma
cf76f6e721 cache: integrate brew --cache and cask --cache 2020-06-19 10:37:31 -04:00
Sean Molenaar
523c24684d
cask: audit locales 2020-06-16 11:41:06 +02:00
Sean Molenaar
d64afece81
Merge pull request #7690 from SMillerDev/cask/audit/token
cask: codify the token rules
2020-06-16 11:40:25 +02:00
Mike McQuaid
ae7e58ef78
Merge pull request #7488 from danielbayley/master
cat: Allow 'bat' to find existing configuration
2020-06-12 10:45:11 +01:00
Sean Molenaar
4a24908fe4
cask: codify the token rules 2020-06-11 19:34:36 +02:00
Markus Reiter
a793bc500c Fix failing appcast check. 2020-06-10 16:39:03 +02:00
Issy Long
8eba9b86ab
Change occurrences of "blacklist" to "denylist" or "disallow"
- 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.
2020-06-06 22:38:33 +01:00
Vítor Galvão
446ef2c85f
Merge branch 'master' into appcast-configuration-match 2020-06-06 03:04:57 +01:00
Vítor Galvão
d485a185d0
Merge pull request #7674 from vitorgalvao/cask-appcast-config-adjusted
Cask: use regex in appcast adjusted_version_stanza
2020-06-06 02:55:15 +01:00
Vítor Galvão
8961ef40d5 Cask: rename appcast configuration to must_contain 2020-06-06 02:53:48 +01:00
Mike McQuaid
aa81982aba
brew style --fix 2020-06-02 09:49:23 +01:00
Vítor Galvão
a7b51ebecd Cask: use regex in appcast adjusted_version_stanza 2020-06-01 14:25:17 +01:00
Markus Reiter
b2ccf3ba78
Merge pull request #7587 from Rylan12/cask-zap-full-disk-access
brew cask zap prompt when Full Disk Access is needed
2020-05-31 23:41:25 +02:00
Gibson Fahnestock
3098c4735b
caveats: add an unsigned_accessibility caveat message
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
2020-05-26 22:51:37 +01:00
Sean Molenaar
3567892802
Add notibility checks for casks 2020-05-26 14:21:25 +02:00
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
11cf77be17
formula_installer: prelude before fetch.
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.
2020-05-23 13:40:13 +01:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Markus Reiter
a7a8569d70
Merge pull request #7607 from reitermarkus/cask-help-usage
Implement `brew cask help <command>`.
2020-05-21 21:02:02 +02:00
Rylan Polster
d0bd687a3d brew cask zap prompts when Full Disk Access is needed 2020-05-21 10:24:28 -04:00
Daniel Bayley
e477a38958 [WIP] cat: Allow 'bat' to find existing configuration file 2020-05-20 16:51:36 +01:00
Mike McQuaid
1ebb1c2885
Merge pull request #7580 from tharun208/brew-cask-analytics
Added analytics for cask info
2020-05-20 08:06:46 +01:00
Markus Reiter
7f400d8e4e Fix brew cask <command> --help. 2020-05-19 19:30:46 +02:00
Markus Reiter
6d9a20614a Implement brew cask help <command>. 2020-05-19 19:23:31 +02:00
Tharun
aeede8374f fixed review changes 2020-05-19 21:41:02 +05:30
Tharun
139ca1d374 Updated analytics method name for cask info 2020-05-17 00:31:12 +05:30
Zach Auten
e877a52fa6 Fix exception when calling "brew cask" with --help and no subcommand 2020-05-14 01:17:33 -04:00
Mike McQuaid
fe6cca3540
cask/cmd/list: remove deprecated -l.
This crashes `brew style`.
2020-05-12 09:09:59 +01:00
Mike McQuaid
12bdb38663
rubocop: brew style --fix autocorrections. 2020-05-12 08:32:27 +01:00
Mike McQuaid
08a9f0e1c0
Use FormulaInstaller#fetch before #prelude. 2020-05-11 09:38:26 +01:00
Michelle Nguyen
2264c08cee
Fetch formula resources before unlinking during upgrade.
Fixes #6374.
2020-05-11 09:37:56 +01:00
Mike McQuaid
e8a29a2d72
Merge pull request #7440 from FTLam11/FTLam11-#7432-add-json-option-to-brew-cask-outdated
Add JSON support for brew cask outdated, fixes #7432
2020-04-29 11:40:22 +01:00
Frank Lam
682914bf40
Improve readability of guard clause
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-29 18:16:39 +08:00
Frank Lam
9a605a1dd6
Refactor Cask#outdated_info 2020-04-28 12:21:51 +08:00
Claudia
b8aa808b9d
Make sure DEFAULT_DIRS values are Pathnames
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.
2020-04-27 15:25:28 +02:00
Claudia
dd3267ece0
Add test for JSON-based cask config loader
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.
2020-04-27 14:54:56 +02:00
Frank Lam
dabbfe3e3e
Fix linter offenses 2020-04-26 21:31:21 +08:00
Frank Lam
f2fa2c5d30
Add JSON support to brew cask outdated
* brew outdated already has JSON support, now users and tools can get
similar results with brew cask outdated --json
2020-04-26 21:13:19 +08:00
Frank Lam
65ff9155f8
Add Cask#outdated_info to format output 2020-04-26 21:07:42 +08:00
Claudia
d026cb91e7
Fix cask loading after adding an artifact type
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
2020-04-21 18:29:14 +02:00
Markus Reiter
30c313b7b9 Refactor cask command parsing logic. 2020-04-11 01:29:44 +02:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Dario Vladovic
3a21ca8956
Implement mdimporter cask stanza 2020-04-06 15:24:14 +02:00
Vítor Galvão
9c342b5dca cask-caveats-kext: retry installation if it fails 2020-03-23 16:13:50 +00:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid
c48352aa6c
cask/cmd/list: fix ambiguous params. 2020-03-13 21:16:18 +00:00
Markus Reiter
19db7bb14b Ensure formula dependencies for casks are linked. 2020-02-21 17:36:55 +01:00