From 2dcc1d9ceea9df74f0176b503b1c59cb5ae122ad Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 12 Mar 2021 17:04:52 +0000 Subject: [PATCH] sources/ostree: capture ostree output Instead of using stderr for the ostree subprocess command capture its output so that in the case of an error we get properly return the error output. With the old behavior all the `ostree` command output would land in the journal of the worker. --- sources/org.osbuild.ostree | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/org.osbuild.ostree b/sources/org.osbuild.ostree index 78d425c1..903280b9 100755 --- a/sources/org.osbuild.ostree +++ b/sources/org.osbuild.ostree @@ -67,7 +67,8 @@ def ostree(*args, _input=None, **kwargs): print("ostree " + " ".join(args), file=sys.stderr) subprocess.run(["ostree"] + args, encoding="utf-8", - stdout=sys.stderr, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, input=_input, check=True)