Signed-off-by: Michał Górny <mgo...@gentoo.org> --- eclass/unpacker.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
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)" -- 2.37.3