Merge pull request #4587 from reitermarkus/ditto

Use `ditto` instead of `unzip`.
This commit is contained in:
Markus Reiter 2018-08-02 05:45:24 +02:00 committed by GitHub
commit 9e025f5e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View 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

View File

@ -20,3 +20,5 @@ module UnpackStrategy
end
end
end
require "extend/os/mac/unpack_strategy/zip" if OS.mac?