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.
This commit is contained in:
Christian Kellner 2021-03-12 17:04:52 +00:00 committed by Achilleas Koutsou
parent b609bb81dd
commit 2dcc1d9cee

View file

@ -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)