Skip to content

Commit

Permalink
Merge pull request #9163 from reitermarkus/lzma
Browse files Browse the repository at this point in the history
Unify `Lzma` and `Xz`.
  • Loading branch information
reitermarkus committed Nov 17, 2020
2 parents 07b8304 + f3c8176 commit af41431
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Library/Homebrew/unpack_strategy/lzma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def self.can_extract?(path)
path.magic_number.match?(/\A\]\000\000\200\000/n)
end

def dependencies
@dependencies ||= [Formula["xz"]]
end

private

sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) }
def extract_to_dir(unpack_dir, basename:, verbose:)
FileUtils.cp path, unpack_dir/basename, preserve: true
Expand All @@ -28,9 +34,5 @@ def extract_to_dir(unpack_dir, basename:, verbose:)
env: { "PATH" => PATH.new(Formula["xz"].opt_bin, ENV["PATH"]) },
verbose: verbose
end

def dependencies
@dependencies ||= [Formula["xz"]]
end
end
end

0 comments on commit af41431

Please sign in to comment.