Skip to content

Commit 9387580

Browse files
committed
Revert "Fall back to os level unzip in case an unzip fails"
This reverts commit 07db6e4.
1 parent 9d1afbd commit 9387580

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/DocUploadBundle/Zipper.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,7 @@ enum Zipper {
2323
}
2424

2525
static func unzip(from inputPath: URL, to outputPath: URL, fileOutputHandler: ((_ unzippedFile: URL) -> Void)? = nil) throws {
26-
do {
27-
try Zip.unzipFile(inputPath, destination: outputPath, overwrite: true, password: nil, fileOutputHandler: fileOutputHandler)
28-
} catch ZipError.unzipFail {
29-
// Try OS level unzip as a fallback
30-
// See https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/3069
31-
let unzip = URL(fileURLWithPath: "/usr/bin/unzip")
32-
let process = try Process.run(unzip, arguments: ["-q", inputPath.path, "-d", outputPath.path])
33-
process.waitUntilExit()
34-
}
26+
try Zip.unzipFile(inputPath, destination: outputPath, overwrite: true, password: nil, fileOutputHandler: fileOutputHandler)
3527
}
3628
}
3729

0 commit comments

Comments
 (0)