131 Commits

Author SHA1 Message Date
EricFromCanada
b9dab243b5
cask/artifact: fix up some definitions
And expand the list of artifacts that target: works with.
2023-04-14 15:47:33 -04:00
Mike McQuaid
63d8de3600
brew style --fix 2023-04-07 19:10:22 +01:00
Markus Reiter
3da305fa80
Add keyboard_layout stanza. 2023-03-26 08:14:24 +02:00
Douglas Eichelberger
4dcd5ac47f Remove HashValidator 2023-03-19 17:37:58 -07:00
Douglas Eichelberger
516c61057b Use ActiveSupport Hash#assert_valid_keys instend of refinement 2023-03-19 17:37:58 -07:00
Ruoyu Zhong
e9ce4a5a4e
Update path to system settings on Ventura
"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-03-17 19:24:07 +08:00
Douglas Eichelberger
900ee97f95 Revert splat changes to AbstractUninstall 2023-03-07 06:46:59 -08:00
Douglas Eichelberger
d98b7845d3 Enable typing in misc files 2023-03-03 08:29:26 -08:00
apainintheneck
c19017c6bd Make Cask#to_h work without the API
Set metadata when we load casks from the source API.

Set `@tap_git_head` manually.

Also, allow `auto_update` to receive false.
This is only done for consistency.

Stop double printing the `kext` caveat.

Handle Array elements correctly when substituting
path elements in artifacts. This affected how the
Uninstall Signal keys were evaluated (they are
represented as arrays of arrays).
2023-02-28 19:36:20 -08:00
Douglas Eichelberger
29c6baeed1 Enable typing in Cask::Artifact 2023-02-22 09:11:29 -08:00
apainintheneck
39c6f7d6fb Stop including *flight block source in cask API
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.

This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83

It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.

More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.
2023-02-13 21:22:18 -08:00
Mike McQuaid
61d6f7c4ca
cask/artifact/stage_only: allow string argument.
This is what's passed from the JSON API.
2023-01-26 11:22:18 +00:00
Luca Ongaro
1fc1c82aed Fix code style and add tests 2023-01-25 00:08:15 +01:00
Luca Ongaro
f5765a73da Avoid mutating the script argument in place
Mutating the argument in place, and in particular deleting the
`:executable` entry, leads to a bug when the same code path leading to
read_script_arguments is invoked twice, like in
https://github.com/Homebrew/homebrew-cask/pull/139749

This commit makes a shallow copy of the argument, so that it can be
safely mutated in the rest of the method.
2023-01-24 23:34:47 +01:00
Mike McQuaid
1adc2c096b
Merge pull request #14370 from Kentzo/fix-cask-lowpriv-sudo
cask: don't assume that sudo has write access to the caskroom
2023-01-20 10:57:35 +00:00
Mike McQuaid
344d32bf7f
Merge pull request #14368 from Kentzo/fix-cask-backup
cask: fix writability check backing up an artifact
2023-01-19 09:58:03 +00:00
Ilya Kulakov
618700a95c cask: don't assume that sudo has write access to the caskroom 2023-01-13 18:10:21 -08:00
Ilya Kulakov
085bd8ddd1 cask: don't attempt to make a directory that already exists. 2023-01-13 16:15:31 -08:00
Ilya Kulakov
3d16112b14 cask: fix writability check backing up an artifact 2023-01-13 15:30:14 -08:00
Rylan Polster
7ca5a5d9a7
Simplify require "method_source" calls 2023-01-02 17:41:36 -05:00
Rylan Polster
2d5d132713
Include *flight block source in cask API 2023-01-02 14:33:33 -05:00
Bevan Kay
3869bf156c
change line splitting method 2022-12-29 12:54:59 +11:00
Bevan Kay
db9d48a7ec
fix tests 2022-12-28 12:50:16 +11:00
Bevan Kay
2614a29419
fix style 2022-12-19 14:43:16 +11:00
Bevan Kay
84f288be79
fix style 2022-12-19 14:39:48 +11:00
Bevan Kay
1ddd130ef9
add comment to .drop(), don't add blank lines to services array 2022-12-19 14:35:20 +11:00
Bevan Kay
e8e6ee30b4
add initial tests 2022-12-13 00:00:43 +11:00
Bevan Kay
836efe621f
cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl 2022-12-05 15:08:23 +11:00
Bevan Kay
33d3a5d728
cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl 2022-11-09 13:21:49 +11:00
Bo Anderson
ad4730395a
cask/artifact/relocated: don't evaluate URL on creation 2022-10-31 13:07:25 +00:00
Mike McQuaid
7eb68835cc
Merge pull request #14033 from ThatsJustCheesy/cask-install-adopt
Add `--adopt` switch
2022-10-26 12:16:49 +01:00
Ian Gregory
9256a01afe
Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-10-25 18:58:06 -04:00
Mike McQuaid
4e3a21b380
cask/artifact/relocated: tweak syntax. 2022-10-25 09:00:54 +01:00
Harry Marr
2d68e27d7b
Prefix artifact source with only_path 2022-10-22 10:54:51 -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
Issy Long
8684f953f6
Merge pull request #13989 from issyl0/sorbet-rbi-is-in-maintenance 2022-10-12 08:48:45 +01:00
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
Issy Long
b7d997e80d
sorbet: Bump some files from typed: false to typed: true
- This was done with `brew typecheck --update --suggest-typed` which
  (as of the previous commit) uses Spoom, yet another gem. I thought I'd
  see how well it works. There are no Sorbet errors after these changes!
2022-10-11 01:09:03 +01:00
Jonathan Chang
a085f235f1
cask/artifact/relocated: widen type 2022-09-10 11:53:38 -07:00
Rylan Polster
90d22bc7b1
Include dsl key in cask artifact hash 2022-08-25 03:04:48 -04:00
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
e78665f4f7
Replace ENV["HOME"] with Dir.home 2022-06-17 19:47:57 +01:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01:00
xxyzz
06d655bf50
match .gz man page files
Emacs cask has compressed man pages and they should be supported.
2021-04-06 11:19:05 +08:00
Michael Cho
a0261c4b39 cask uninstall script: allow tilde expansion to '$HOME' 2021-03-28 09:52:49 -07:00
Nanda H Krishna
eecbd5887c
Apply suggestion from review
Co-authored-by: Markus Reiter <me@reitermark.us>
2021-03-26 02:28:51 +05:30
nandahkrishna
94737ef41d
cask: add password warning for pkg uninstall 2021-03-26 00:11:39 +05:30
Bo Anderson
323ff660fa rubocop: use consistent array/hash indentation 2021-02-11 13:27:42 +00:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00