Skip to content

Commit 7d1798e

Browse files
authored
Untar using -xf instead of -xzf (#113)
Unpacking XZ-compressed archives (like `host_llvm_17.0.5_x86_64-unknown-linux.tar.xz`) with GNU tar requires either using the `-J` flag or none at all (rather than the `-z` flag, which seems to be reserved for gzip). On macOS, `-xzf` behaves like `-xf`, which is likely why this issue didn't come up there. With `-xf` both macOS and GNU tar automatically recognize the right format. Fixes #112.
1 parent db85e25 commit 7d1798e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public actor SwiftSDKGenerator {
243243
stripComponentsOption = ""
244244
}
245245
try await Shell.run(
246-
#"tar -C "\#(directoryPath)" \#(stripComponentsOption) -xzf \#(file)"#,
246+
#"tar -C "\#(directoryPath)" \#(stripComponentsOption) -xf \#(file)"#,
247247
shouldLogCommands: self.isVerbose
248248
)
249249
}

0 commit comments

Comments
 (0)