pacdiff: Fix regression in check for merge status

Message ID 20210328074554.58319-1-polyzen@archlinux.org
State New
Headers show
Series pacdiff: Fix regression in check for merge status | expand

Commit Message

Daniel M. Capella March 28, 2021, 7:45 a.m. UTC
Signed-off-by: Daniel M. Capella <polyzen@archlinux.org>
---
 src/pacdiff.sh.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/src/pacdiff.sh.in b/src/pacdiff.sh.in
index 674892b..004203f 100644
--- a/src/pacdiff.sh.in
+++ b/src/pacdiff.sh.in
@@ -122,7 +122,8 @@  merge_file() {
 	merged="$($SUDO mktemp "$tempdir"/"$basename.merged.XXX")"
 
 	tar -xOf "$base_tar" "${file#/}" | $SUDO tee "$base" > /dev/null
-	if $SUDO $mergeprog "$file" "$base" "$pacfile" | $SUDO tee "$merged" > /dev/null; then
+	$SUDO $mergeprog "$file" "$base" "$pacfile" | $SUDO tee "$merged" > /dev/null
+	if [ "${PIPESTATUS[0]}" -ne "1" ]; then
 		msg2 "Merged without conflicts."
 	fi