Skip to content
Snippets Groups Projects
Unverified Commit cc0a249f authored by Bo Anderson's avatar Bo Anderson
Browse files

unpack_strategy/zip: fix super ancestor on macOS without Sorbet Runtime

parent 8fbe9275
Branches
Tags
No related merge requests found
......@@ -6,10 +6,9 @@ require "system_command"
module UnpackStrategy
class Zip
module MacOSZipExtension
include UnpackStrategy
include SystemCommand::Mixin
private
sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) }
sig { 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)
......@@ -58,8 +57,6 @@ module UnpackStrategy
end
end
private
sig { params(path: Pathname).returns(T::Boolean) }
def contains_extended_attributes?(path)
path.zipinfo.grep(/(^__MACOSX|\._)/).any?
......
# typed: strict
module UnpackStrategy::Zip::MacOSZipExtension
include Kernel
requires_ancestor { UnpackStrategy }
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment