Merge pull request #12947 from Bo98/unzip-path
unpack_strategy/zip: allow unzip formula to be used
This commit is contained in:
commit
3ddcaacfd7
@ -27,10 +27,17 @@ module UnpackStrategy
|
||||
.returns(SystemCommand::Result)
|
||||
}
|
||||
def extract_to_dir(unpack_dir, basename:, verbose:)
|
||||
unzip = begin
|
||||
Formula["unzip"]
|
||||
rescue FormulaUnavailableError
|
||||
nil
|
||||
end
|
||||
|
||||
with_env(TZ: "UTC") do
|
||||
quiet_flags = verbose ? [] : ["-qq"]
|
||||
result = system_command! "unzip",
|
||||
args: [*quiet_flags, "-o", path, "-d", unpack_dir],
|
||||
env: { "PATH" => PATH.new(unzip&.opt_bin, ENV["PATH"]) },
|
||||
verbose: verbose,
|
||||
print_stderr: false
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user