summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-09-24 15:54:22 +0200
committerMichał Górny <mgorny@gentoo.org>2022-09-27 22:27:57 +0200
commitd9c52be803d9b4be5776876d626dab183163822e (patch)
treef56d2409a9ab148919895a2d39467ed20bc96f47
parentunpacker.eclass: Remove `-f` from zstd arguments (diff)
downloadgentoo-d9c52be8.tar.gz
gentoo-d9c52be8.tar.bz2
gentoo-d9c52be8.zip
unpacker.eclass: Fix unpack_7z to respect the exit status
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--eclass/unpacker.eclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index c26523a419df..1f2f09e33ad6 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -344,8 +344,11 @@ unpack_7z() {
local p7z=$(find_unpackable_file "$1")
unpack_banner "${p7z}"
- local output="$(7z x -y "${p7z}")"
+ # warning: putting local and command substitution in a single call
+ # discards the exit status!
+ local output
+ output="$(7z x -y "${p7z}")"
if [ $? -ne 0 ]; then
echo "${output}" >&2
die "unpacking ${p7z} failed (arch=unpack_7z)"