summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/ukify/ukify.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py
index e9e5d13d13..cd27f92a97 100755
--- a/src/ukify/ukify.py
+++ b/src/ukify/ukify.py
@@ -161,7 +161,10 @@ class Uname:
]
print('+', shell_join(cmd))
- notes = subprocess.check_output(cmd, text=True)
+ try:
+ notes = subprocess.check_output(cmd, stderr=subprocess.PIPE, text=True)
+ except subprocess.CalledProcessError as e:
+ raise ValueError(e.stderr.strip()) from e
if not (m := re.search(cls.NOTES_PATTERN, notes, re.MULTILINE)):
raise ValueError('Cannot find Linux version note')