264 Commits

Author SHA1 Message Date
Markus Reiter
bdd6523ce8
Deprecate appcast. 2023-03-30 03:29:06 +02:00
Mike McQuaid
253dca568c
Revert "move cask/cmd/reinstall" 2023-03-23 17:06:42 +00:00
hyuraku
31e49d96af move cask/cmd/reinstall to cask/reinstall 2023-03-23 22:50:03 +09:00
Dustin Rodrigues
b776fb32de
change includecount to include_count for readability 2023-03-20 07:23:17 -04:00
Dustin Rodrigues
e5fba88035
use includecount argument in pluralize 2023-03-19 23:35:47 -04:00
Mike McQuaid
c31ae1ce6a
Merge pull request #14948 from hyuraku/remove-cask/cmd/fetch
remove `cask/cmd/fetch`
2023-03-19 17:21:22 -04:00
hyuraku
da6f48dbd0
Merge branch 'master' into move-cask/cmd/uninstall 2023-03-12 11:49:06 +09:00
hyuraku
413e8ac81e remove cask/cmd/fetch 2023-03-11 22:12:33 +09:00
hyuraku
db328b59f2 move cask/cmd/uninstall to cask/uninstall 2023-03-09 22:33:29 +09:00
hyuraku
19f83ef67f move cask/cmd/upgrade to cask/upgrade 2023-03-09 20:40:20 +09:00
hyuraku
7c1bd961c6 remove cask/cmd/zap and cask/cmd/zap_spec 2023-03-06 22:27:53 +09:00
hyuraku
e39232313f move cask/cmd/list to cask/list 2023-03-02 21:53:15 +09:00
Mike McQuaid
9296db0c41
Merge pull request #14839 from hyuraku/move-cask/cmd/info-to-cask/info
Move `cask/cmd/info` to `cask/info`
2023-03-01 12:25:26 +00:00
apainintheneck
64ef2f1899 cask/cmd/upgrade: fix missing versions variable
This reference to the versions variable is unnecessary.
2023-02-28 22:58:00 -08:00
hyuraku
efdef5f26c move cask/cmd/info to cask/info 2023-03-01 00:00:54 +09:00
Douglas Eichelberger
2073e70696 brew style --fix 2023-02-27 21:43:10 -08:00
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
2400c6daed brew style --fix 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
37015b6b08 Change to pluralize, port more call sites 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
0438a3a538 Draft implementation to replace ActiveSupport inflections 2023-02-27 20:17:33 -08:00
Issy Long
44b0050b94
cmd/(outdated,upgrade): Document -g as a shorter --greedy for Casks
- Fixes https://github.com/Homebrew/brew/issues/ 14682.
2023-02-18 18:47:49 +00:00
apainintheneck
6914c310c7 extend/os: remove cask install code
This code is unnecessary since `--formula` is passed
by default to the install command on Linux making it
impossible to reach `Cask::Cmd::Install.install_casks`
since it is surrounded by `if casks.any?; end`.
2023-02-09 17:35:02 -08:00
Mike McQuaid
342d40e88d
Merge pull request #14510 from reitermarkus/audit-only-except
Pass `only` and `except` to cask audits.
2023-02-08 09:05:00 +01:00
Markus Reiter
b821a00bc5
Pass only and except to cask audits. 2023-02-08 08:38:32 +01:00
hyuraku
8daca925f1 remove #TODO 2023-02-07 22:56:04 +09:00
hyuraku
c066e940c4 apply extend/os to Cask::cmd::install#install_casks 2023-02-07 22:54:06 +09:00
Rylan Polster
dde44ed37c
Clarify cause of the bug in messaging
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-05 16:10:22 +01:00
Rylan Polster
0fd1be9a8e
Add error message with instructions for the missing cask file 2023-02-05 15:35:11 +01:00
apainintheneck
47b3f6fe6e Stop including/extending search.rb
- Instead use class methods.
- This is better than use it as a mixin
  when only a small number of methods are
  used in each class or module.
- It also allows us to conditionally
  require it in `brew install`.
- Removed unused search require in descriptions.rb.
2022-12-17 11:08:13 -08:00
apainintheneck
c477b9aab3 Cleanup after adding os specific rubocop
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
  checks to extend/os in the future
2022-11-29 23:13:50 -08:00
Daniel Bayley
b9ee9b868d Fix install <cask> --dry-run 2022-11-11 17:33:11 +00:00
Ian Gregory
a0f915169c Remove --adopt switch from reinstall and upgrade 2022-10-25 19:07:21 -04:00
Ian Gregory
a715dec49d Add --adopt switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.

Discussion: #14006
2022-10-21 23:28:51 -04:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
hyuraku
374dd3dea2 repair if syntax and remove useless line 2022-08-27 22:29:07 +09:00
hyuraku
b61ae59421 repair syntax 2022-08-19 21:43:57 +09:00
hyuraku
1bfcf314ac repair style 2022-08-18 00:16:11 +09:00
hyuraku
8a7f445d1f repair how to show casks to be installed 2022-08-17 22:14:05 +09:00
hyuraku
93ebe42a72 add dry-run option to cask#install 2022-08-16 21:00:45 +09:00
Sean Molenaar
cc61a759ed
Merge pull request #13627 from SMillerDev/feature/cask/signing_check
cask: add audit for incorrect signing
2022-08-16 10:51:59 +02:00
fn ⌃ ⌥
a208ea9c92 info: highlight package name 2022-08-15 07:47:52 -07:00
Sean Molenaar
e90371f8ab
cask: add audit for incorrect signing 2022-08-11 09:11:29 +02:00
Bevan Kay
1f43bf32a4
cask: add statement when upgrade won't be installed 2022-05-26 10:06:58 +10:00
Mike McQuaid
94148c3bc8
Fix handling unreadable casks
When casks are unreadable (e.g. have invalid syntax, the cask file
cannot be found) then it's not been possible to uninstall them, list
them or perform any operation which iterates through all casks.

Handle these various cases by falling back to creating a `Cask::Cask`
object using just the name/token and latest installed version on disk.

This provides enough functionality to be able to verbosely list these
casks, not error on listing and, most importantly, uninstall/reinstall
them.

Fixes https://github.com/Homebrew/homebrew-cask/issues/62223
2022-05-16 17:27:13 -04:00
xxyzz
1b877273d8
Don't print Cask installed error message when --quiet is used 2022-05-11 11:03:20 +08:00
Issy Long
0b6b2f04da
cask/reinstall: Support --zap for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew
  reinstall` have parity here for a better user experience. (Requested
  in issue 12983.)
- It feels weird that to get my new reinstall test to pass I had to add
  `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get
  the tests to pass. But the `brew reinstall --cask caffeine --zap`
  command worked fine all the time. The CLI argument parser from the
  test run was complaining about not knowing what `zap` was. As a
  result, `--zap` now shows up as a switch in `brew install --help`
  which I'm not 100% convinced is the desired UX. But I've edited the
  description accordingly to specify that it will only work on
  `reinstall` operations (and `--zap` on `install` is a no-op).

```
issyl0 at pictor in /opt/homebrew on reinstall-cask-zap
❯ brew reinstall --cask caffeine --zap
==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg
Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg
==> Implied `brew uninstall --cask caffeine`
==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app'
==> Removing App '/Applications/Caffeine.app'
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/com.intelliscapesolutions.caffeine
~/Library/Preferences/com.intelliscapesolutions.caffeine.plist
~/Library/Caches/com.intelliscapesolutions.caffeine
~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies
==> Removing all staged versions of Cask 'caffeine'
==> Installing Cask caffeine
==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app'
🍺  caffeine was successfully installed!
```
2022-04-09 16:37:23 +01:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00