Merge pull request #4587 from reitermarkus/ditto
Use `ditto` instead of `unzip`.
This commit is contained in:
commit
9e025f5e44
9
Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb
Normal file
9
Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb
Normal file
@ -0,0 +1,9 @@
|
||||
module UnpackStrategy
|
||||
class Zip
|
||||
def extract_to_dir(unpack_dir, basename:, verbose:)
|
||||
# `ditto` keeps Finder attributes intact and does not skip volume labels
|
||||
# like `unzip` does, which can prevent disk images from being unzipped.
|
||||
system_command! "ditto", args: ["-x", "-k", path, unpack_dir]
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -20,3 +20,5 @@ module UnpackStrategy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require "extend/os/mac/unpack_strategy/zip" if OS.mac?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user