Use ditto instead of unzip.

This commit is contained in:
Markus Reiter 2018-08-01 07:41:52 +02:00
parent 96eb404af9
commit 2e48373305
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

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