Merge pull request #11264 from Bo98/unzip-tz
unpack_strategy/zip: ensure consistent timezone management
This commit is contained in:
commit
90f515e336
@ -15,6 +15,7 @@ module UnpackStrategy
|
||||
|
||||
sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) }
|
||||
def extract_to_dir(unpack_dir, basename:, verbose:)
|
||||
with_env(TZ: "UTC") do
|
||||
if merge_xattrs && contains_extended_attributes?(path)
|
||||
# We use ditto directly, because dot_clean has issues if the __MACOSX
|
||||
# folder has incorrect permissions.
|
||||
@ -59,6 +60,7 @@ module UnpackStrategy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ module UnpackStrategy
|
||||
.returns(SystemCommand::Result)
|
||||
}
|
||||
def extract_to_dir(unpack_dir, basename:, verbose:)
|
||||
with_env(TZ: "UTC") do
|
||||
quiet_flags = verbose ? [] : ["-qq"]
|
||||
result = system_command! "unzip",
|
||||
args: [*quiet_flags, "-o", path, "-d", unpack_dir],
|
||||
@ -38,6 +39,7 @@ module UnpackStrategy
|
||||
result
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require "extend/os/mac/unpack_strategy/zip" if OS.mac?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user