Raise on failed docker build

This commit is contained in:
Michael Chen 2022-11-15 09:42:05 +01:00
parent c3e881d52b
commit 465c770247
Signed by: cnml
GPG Key ID: 5845BF3F82D5F629

View File

@ -146,7 +146,10 @@ def docker_buildx(repository: str, tags: list[str], build_platforms: list[Docker
*[t for label in labels for t in ("--tag", label)],
"--pull", "--push", directory]
print(" ".join(command))
subprocess.run(command)
process = subprocess.run(command, stderr=subprocess.PIPE)
if process.returncode != 0:
error = process.stderr.decode('utf-8')
raise Exception(error)
default_java_version: JavaVersion = {