40 Commits

Author SHA1 Message Date
Patrick Linnane
c2e2b23c50
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-10-02 10:03:12 -07:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Markus Reiter
caf87c0336
Warn about undocumented non-private APIs. 2024-05-01 11:35:20 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Markus Reiter
c76170a456
Hide #to_s in docs. 2024-04-26 14:04:55 +02:00
Markus Reiter
670eb3d02d
Remove CaskLoader::tap_paths. 2024-02-20 18:25:11 +01:00
Markus Reiter
6f28392d6e
Remove FromDefaultTapPathLoader and FromDefaultTapLoader. 2024-02-12 07:12:33 +01:00
Rylan Polster
641a80475e
Update cask logic to handle deprecations and disables 2023-12-16 20:01:47 -05:00
apainintheneck
c9dea04bd4 cmd/install: upgrade already installed casks
Previously, the behavior was to warn users that a cask was already
installed and then skip modifying the installed version. This is
different to how we handled things with formulas. For them we would
upgrade any already installed formulas. This just brings casks in line
with what we already do with formulas.

Changes:
- cmd/install: Upgrade already installed casks if HOMEBREW_NO_INSTALL_UPGRADE
  is not set
- env_config: Update wording of HOMEBREW_NO_INSTALL_UPGRADE to include casks
- remove error that was only used to alert about already installed casks

Note:
- The upgrade command for casks defaults to --greedy when you pass named casks
  to the command which means that this will always default to that behavior
  since you must specify the name of the cask when installing.
2023-07-23 18:50:39 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Rylan Polster
55da9f293d
Cleanup Cask::Caskroom::casks 2022-06-26 14:24:05 -04:00
Mike McQuaid
a691768c81
cask/exceptions: fix reinstall cask messaging.
Fixes #12813.
2022-02-01 08:39:40 +00:00
Bo Anderson
4836ea0ba2
Remove XQuartz handling 2021-11-05 12:40:22 +00:00
nandahkrishna
585ec90878
cask_loader: do not auto-tap in FromTapLoader 2021-03-11 21:09:42 +05:30
Markus Reiter
3c2ec1c60f Deprecate remaining cask commands. 2020-11-21 19:56:12 +01:00
Markus Reiter
c54a9937e7 Remove cask-specific checksum errors. 2020-11-19 19:46:59 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Andrew Zhou
1c1ffc1f19 cask/exceptions: Actually print actual hash 2020-09-16 18:12:51 -05:00
Luthaf
3376646b06 Do not suggest use of deprecated brew cask reinstall 2020-09-04 11:37:37 +02:00
Markus Reiter
b582efceaa Document cask exceptions. 2020-08-26 03:13:59 +02:00
Mike McQuaid
e8143e5de7
cask/exceptions: fix super calls.
Ensure that we always pass no arguments here.
2020-08-21 13:09:51 +01:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Борис Верховский
96ba643f03
Print SHA checksum in double quotes
to match formatting used in formulas, for easier copy/pasting.
2020-08-10 22:10:49 -06:00
Mike McQuaid
f951ea83d4
Fix brew style. 2020-07-07 12:23:29 +01:00
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
Mike McQuaid
73528b6a08
Freeze more strings
Freeze the results changed in #6072.
2019-04-29 13:02:15 +01:00
Markus Reiter
85c3b55e2b Fix exception in exception. 2019-04-28 15:16:47 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
1281c4a663
Merge pull request #5983 from zachauten/continue-upgrading-casks-after-failure
'brew cask upgrade' will continue upgrading casks after a failure
2019-04-14 10:01:32 +01:00
EricFromCanada
e0558dc7c7 trim line breaks 2019-04-13 21:37:48 -04:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
15c38a2d8b formatting fixes 2019-04-13 21:29:32 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Zach Auten
41b5b788d5 'brew cask upgrade' will continue upgrading casks after a failure
'cask upgrade' command collects all exceptions thrown
from individual casks during the upgrade process. If
there were more than one cask that raised exceptions
during the upgrade process, a MultipleCaskErrors
exception will be thrown.

Issue #5203
2019-04-12 19:26:33 -04:00
Vítor Galvão
ffe4c6bcef CaskSha256MismatchError: link to fix 2019-01-23 18:57:19 +00:00
L. E. Segovia
ab31af2b4b
Cask: fixes for quarantining
Gatekeeper's Path Randomization is currently making automated
installation a nightmare. Let's manually toggle the (undocumented) app
translocation bit in the `com.apple.quarantine` extended attribute.

While we're at it, let's also toss in some fixes:

- zip downloads with improper permissions that prevent us from
quarantining
- quarantine/release/skip downloads as requested by the user
2018-09-07 15:37:31 +00:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Mike McQuaid
e06f8a8beb
Rename Homebrew-Cask to Homebrew Cask. 2018-09-04 09:56:57 +01:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00