101 Commits

Author SHA1 Message Date
Issy Long
af6e1194d2
unpack_strategy/dmg: Convert to Sorbet typed: strict
- I missed this, whoops.
2024-07-11 21:34:26 -04:00
Issy Long
edb8055c76
unpack_strategy/*: Convert to Sorbet typed: strict 2024-07-11 21:18:27 -04:00
Issy Long
9c6430954b
All the extract_to_dirs return void now 2024-07-11 11:05:47 +01:00
Douglas Eichelberger
4ebf1116d7 Introduce UnpackStrategyImpl 2024-07-08 12:56:19 +01:00
Kevin
c3c1528611
Revert "Use cp -c when copying files" 2024-06-17 21:17:10 -07:00
Mike McQuaid
1e0add6d66
Merge pull request #17373 from tesaguri/cp-reflink 2024-06-13 08:57:20 +01:00
Daiki Mizukami
028cfe1ea6
Utils::Cp: Rename to Utils::Copy
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#discussion_r1633217748
2024-06-11 20:31:34 +09:00
Daiki Mizukami
67f280eb53
Utils::Cp: Add force_system keyword argument
This fixes the test for `UnpackStrategy::Directory`, which needs the
`cp` command.
2024-06-09 07:57:56 +09:00
Daiki Mizukami
b2ddeecdd9
Utils::Cp: Remove copy prefix from method name
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#pullrequestreview-2104523770

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-06-08 07:58:20 +09:00
Daiki Mizukami
58852106c1
Utils::Cp: Rename copy* methods to copy*_with_attributes
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#pullrequestreview-2103870774
2024-06-07 19:03:33 +09:00
Issy Long
509fffab2b
Make more files Sorbet typed: strict
- According to Spoom, these could be bumped automatically with no errors.
2024-06-02 15:15:24 +01:00
Daiki Mizukami
deaac7ce47
Use Utils::Cp to copy files
This replaces `FileUtils.cp` and `system_command! "cp"` with the new
`Utils::Cp` utility where it is expected that the performance
improvement outweighs the cost of the system command invocation.
2024-05-27 12:11:41 +09:00
Justin Krehel
344a5021d8
cask/audit.rb: update signing checks for app, binary, and pkg 2024-05-22 10:29:47 -04:00
Mike McQuaid
0bbfa434cf
unpack_strategy/dmg: fix permissions when needed.
`ditto` behaves weirdly when the EUID is different from the UID. This
fix ensures that the BOM file is written with the correct permissions
in this case.
2024-04-01 09:49:10 +01:00
Michael Cho
7b46378a6c
unpack_strategy: allow unpacking .crate (as a gzipped tar)
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-26 11:05:10 -04:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Bo Anderson
1d7101d8a3
Use HOMEBREW_TEMP more universally 2024-02-26 16:58:53 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Carlo Cabrera
0867534f3e
unpack_strategy/zip: avoid loading formulae unnecessarily
If we already have `unzip` in `PATH`, let's skip trying to load the
`unzip` formula.
2023-05-31 00:06:55 +08:00
Michael Wagner
78c07fd0e1
Fix Missing Download Strategy And Dependency 2023-05-17 16:30:00 -05:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
f38a672938 brew style --fix 2023-03-21 17:37:48 -07:00
Douglas Eichelberger
82dc57dfea Enable UnpackStrategy types 2023-03-21 17:37:46 -07:00
Markus Reiter
c6a5d79ef9
Remove explicit error for empty BOM retry. 2023-03-21 00:39:26 +01:00
Markus Reiter
1e0e12cc43
Retry if DMG BOM is empty. 2023-03-13 18:32:56 +01:00
Markus Reiter
4f04e9e599
Add signatures for extraction functions. 2023-02-22 22:15:53 +01:00
Mike McQuaid
d292dbdc2b
Revert "Fix permissions before moving extracted files." 2023-02-20 17:20:57 +00:00
Markus Reiter
7c5b6fd10d
Add signatures for extraction methods. 2023-02-19 19:29:21 +01:00
Mike McQuaid
6a25229567
brew style --fix 2023-01-02 19:18:51 +00:00
apainintheneck
65bce0ed3c Move unpack_strategy/zip check to extend/os 2022-11-23 20:39:59 -08: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
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
aa4ad964eb
unpack_strategy/zip: allow unzip formula to be used 2022-03-02 13:34:26 +00:00
Alexander Bayandin
e74f996b02
unpack_strategy/tar: fix zst subextraction 2021-10-01 10:45:49 +01:00
Alexander Bayandin
fe9a039774
unpack_strategy: add zstd 2021-09-20 14:12:30 +01:00
Bo Anderson
7ee76b85d5
unpack_strategy/zip: ensure consistent timezone management 2021-04-27 20:29:18 +01:00
Mike McQuaid
b57fe84f81
Use long/readable tar flags.
Also, use `--no-same-permissions` instead of `-o` (which does nothing
without `-p` being passed and run as `root`) for the more explicit
description of the behaviour we want.
2021-04-16 14:05:06 +01:00
Michael Cho
1a398f9aaf cask install: increase APFS test sleep to avoid slow eject fail 2021-04-03 10:21:50 -07:00
Michael Cho
cf8d96e0b2 cask install: fix APFS DMG eject to use physical disk 2021-03-29 19:59:20 -07:00
Bo Anderson
323ff660fa rubocop: use consistent array/hash indentation 2021-02-11 13:27:42 +00:00
EricFromCanada
571179ff0e pass second argument to ohai when applicable 2021-01-26 15:36:43 -05:00
Seeker
fbafaff4fe rubocop: require braces for Sorbet sig 2021-01-18 16:52:45 -08:00
Markus Reiter
794b128969 Work around BOM find bug. 2020-11-26 14:13:01 +01:00
Markus Reiter
db980464f6 Try retrying BOM find command. 2020-11-25 22:36:29 +01:00
Markus Reiter
daea3c090e Add debug output of find command when creating BOM. 2020-11-25 19:37:36 +01:00
Markus Reiter
b9fc7e100b Add more BOM debug information. 2020-11-24 22:12:17 +01:00
Markus Reiter
c324155295 Add debug information for empty BOM error. 2020-11-24 18:26:15 +01:00
Markus Reiter
f3c81760cb Unify Lzma and Xz. 2020-11-17 12:20:08 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00