119 Commits

Author SHA1 Message Date
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Mike McQuaid
7e35ae25d5
cask/utils: quieten down when fixing permissions fails.
When fixing permissions fails, we should not print the error messages
from e.g. `chmod` unless we are in debug or verbose mode (because we
immediately retry taking ownership `sudo`).
2024-04-01 16:22:42 +01:00
Bo Anderson
011dfc8f45
cask/artifact/moved: fix permission handling when removing directories 2024-03-15 21:31:37 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
ab8f5702ac
git grep -l '^shared_examples' | xargs gsed -i 's|^shared_examples|RSpec.shared_examples|g' 2024-02-19 13:57:28 +00:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
12d32cc69e Manual fixes 2024-02-11 20:13:24 -08:00
Douglas Eichelberger
2be13eb715 brew style --fix 2024-02-11 14:35:42 -08:00
Markus Reiter
d42f419217
Don't use slashes when loading casks in tests. 2024-02-09 23:17:25 +01:00
Bevan Kay
bd6ab1d2b8
cask/uninstall: skip quit and signal directives when upgrading or reinstalling 2024-01-19 23:30:25 +11:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
JBYoshi
97b9b61061
Change permission failure from fatal to warning. 2023-05-26 11:13:23 -05:00
JBYoshi
40352cb2da
Make Homebrew check for App Management permissions before updating apps. 2023-05-24 22:11:16 -05:00
Markus Reiter
d7a0e260e8
Improve Cask::Utils.gain_permissions_remove for symlinks. 2023-05-13 03:54:48 +02:00
JBYoshi
b1c7f12fbb
Clean up allow and expect. 2023-05-12 09:57:12 -05:00
JBYoshi
4a3b8923f2
More test cleanup. 2023-05-12 09:52:57 -05:00
JBYoshi
5e23a0563a
Switch base case expect() to allow(). 2023-05-11 17:10:41 -05:00
JBYoshi
7a108d3db0
Merge and_call_original instruction into expect() calls. 2023-05-11 17:09:27 -05:00
JBYoshi
84ad387661
Clean up code for feedback. 2023-05-11 13:29:56 -05:00
JBYoshi
a1780c842c
Improve unit test to make sure the sudo version is used. 2023-05-11 12:44:35 -05:00
JBYoshi
2e8232de39
Replace wildcard copy with a loop over children.
Fixes one of the errors in https://github.com/orgs/Homebrew/discussions/4498 (specifically "cp: [...].app/*:
No such file or directory").
2023-05-11 11:47:16 -05:00
Markus Reiter
df620ad3ba
Make manual installers easier to open. 2023-05-08 08:25:32 +02:00
Mike McQuaid
0e387fee8c
Merge pull request #15138 from JBYoshi/cask-move-contents
Don't remove cask directories when upgrading.
2023-05-04 11:43:44 +01:00
Ilya Kulakov
6a4322833f sudo: Fix tests. 2023-04-28 11:22:54 -07:00
JBYoshi
a1571702d3
Merge remote-tracking branch 'origin/master' into cask-move-contents 2023-04-25 15:44:29 -05:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
JBYoshi
9fedaee462
Only keep empty directories when the new version also has them. 2023-04-08 16:13:12 -05:00
JBYoshi
dcc4ae76e8
Also keep app directories with "brew reinstall". 2023-04-04 11:36:27 -05:00
JBYoshi
5c9fa845a8
Add unit test for upgrading. 2023-04-04 10:22:45 -05:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
Douglas Eichelberger
29c6baeed1 Enable typing in Cask::Artifact 2023-02-22 09:11:29 -08:00
Luca Ongaro
490679da45 Improve test 2023-01-25 00:19:37 +01:00
Luca Ongaro
1fc1c82aed Fix code style and add tests 2023-01-25 00:08:15 +01:00
Douglas Eichelberger
357807fbac Resolve cask/artifact/pkg_spec violation 2023-01-22 17:09:55 -08:00
Ilya Kulakov
3d16112b14 cask: fix writability check backing up an artifact 2023-01-13 15:30:14 -08:00
Bevan Kay
3bdab156c2
add additional test 2022-12-29 12:54:21 +11:00
Bevan Kay
db9d48a7ec
fix tests 2022-12-28 12:50:16 +11:00
Bevan Kay
01f865f93a
update test 2022-12-19 14:35:31 +11:00
Bevan Kay
e8e6ee30b4
add initial tests 2022-12-13 00:00:43 +11: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
Mike McQuaid
7349c2b996
brew style --fix 2022-09-13 09:43:09 +01:00
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
40bbdc659e
Fix some Style/FetchEnvVar offences 2022-06-17 19:47:57 +01:00
xxyzz
3c18e98432
test .gz man page 2021-04-06 16:52:56 +08:00
Issy Long
e1ad07190e
rubocop: Fix RSpec/ContextWording offenses
- For some of these I changed `context` to `describe` as it fit better
  rather than contriving a "when", "with" or "without", or massively
  restructuring the tests.
2021-02-19 23:30:41 +00:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
Markus Reiter
287dfee35f Properly handle ~ artifact targets. 2020-12-13 03:31:34 +01:00
Markus Reiter
d5b184d17a Add types for SystemCommand. 2020-11-23 05:48:43 +01:00