Skip to content

Commit 5e41408

Browse files
committed
improve error message on program check failure
1 parent dcf69c1 commit 5e41408

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

atomic-update

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ from shlex import quote
2828
import xml.etree.ElementTree as ET
2929

3030
# Constants
31-
VERSION = "0.1.17"
31+
VERSION = "0.1.18"
3232
ZYPPER_PID_FILE = "/run/zypp.pid"
3333
VALID_CMD = ["dup", "run", "rollback"]
3434
VALID_OPT = ["--reboot", "--apply", "--shell", "--continue", "--no-verify", \
@@ -134,10 +134,11 @@ def verify_programs(TMP_MOUNT_DIR):
134134
version_str = "-version" if program in ["Xorg", "Xwayland"] else "--version"
135135
command = f"chroot {TMP_MOUNT_DIR} bash -c '" \
136136
f"command -v {program} || exit 0 && sudo -u nobody {env_str} {program} {version_str}" \
137-
f"' > /dev/null 2>&1"
137+
f"'"
138138
out, ret = shell_exec(command)
139139
if ret != 0:
140140
failed_programs.append(program)
141+
logging.error(f"Checking {program!r} version returned non-zero exit code {ret} and output:\n{out}")
141142
logging.debug(f"Failed programs: {', '.join(failed_programs)}")
142143
return failed_programs
143144

0 commit comments

Comments
 (0)