Fix zstd: /*stdin*\: unsupported format (#11831)

This commit is contained in:
Ed Reel
2025-04-26 18:17:09 -05:00
committed by GitHub
parent fd3bf9a599
commit 281d0db177
2 changed files with 3 additions and 10 deletions

View File

@@ -645,17 +645,10 @@ def unpack(meta)
when /\.zip$/i
puts "Unpacking archive using 'unzip', this may take a while..."
system 'unzip', (CREW_VERBOSE ? '-v' : '-qq'), '-d', @extract_dir, meta[:filename], exception: true
when /\.(tar(\.(bz2|lz|lzma))?|tbz)$/i
when /\.(tar(\.(bz2|gz|lz|lzma))?|tbz|tgz)$/i
puts "Unpacking archive using 'tar', this may take a while..."
system 'tar', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
when /\.(tar(\.(gz|xz))?|tgz|txz|tpxz)$/i
puts "Unpacking archive using 'tar', this may take a while..."
if Kernel.system('zstd --help 2>/dev/null| grep -q lzma', %i[out err] => File::NULL)
system 'tar', '-Izstd', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
else
system 'tar', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
end
when /\.tar\.zst$/i
when /\.(tar(\.(xz|zst))?|txz|tpxz)$/i
puts "Unpacking archive using 'tar', this may take a while..."
system 'tar', '-Izstd', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
when /\.deb$/i

View File

@@ -3,7 +3,7 @@
require 'etc'
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
CREW_VERSION ||= '1.59.3' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
CREW_VERSION ||= '1.59.4' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
# Kernel architecture.
KERN_ARCH ||= Etc.uname[:machine]