From 8fb2d1ea58360ed47e76ee8c4fc3a8e814f6d35d Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 16 May 2020 17:05:50 -0400 Subject: [PATCH] Use `tar -f -` to read from stdin. Not all implementations of tar assume reads from stdin if no filename is given. Fixes extracts on OpenBSD. --- chocpkg/modules/fetch_download.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chocpkg/modules/fetch_download.sh b/chocpkg/modules/fetch_download.sh index a52832b..4ca664b 100644 --- a/chocpkg/modules/fetch_download.sh +++ b/chocpkg/modules/fetch_download.sh @@ -62,7 +62,7 @@ fetch_download::extract_package_file() { local parent_dir=$(dirname "$PACKAGE_BUILD_DIR") cd "$parent_dir" fi - (fetch_download::decompress "$dlfile" | tar -x) || ( + (fetch_download::decompress "$dlfile" | tar -x -f -) || ( mv "$dlfile" "$dlfile.bad" chocpkg::abort "Failed to extract $PACKAGE_FILENAME: bad download?" )