Only write error lines to exception

This commit is contained in:
Michael Chen 2022-11-15 10:13:03 +01:00
parent 93efca9f95
commit 2933571ec4
Signed by: cnml
GPG Key ID: 5845BF3F82D5F629

View File

@ -161,7 +161,7 @@ def docker_buildx(repository: str, tags: list[str], build_platforms: list[Docker
if process.returncode != 0:
output = process.stdout.decode('utf-8')
print(output)
error = process.stderr.decode('utf-8')
error = "\n".join(line for line in process.stderr.decode('utf-8').splitlines() if 'ERROR' in line)
raise Exception(error)