From 465c77024732590dae10fca2fec7b05aeb946b17 Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Tue, 15 Nov 2022 09:42:05 +0100 Subject: [PATCH] Raise on failed docker build --- build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 404f76d..931ab74 100755 --- a/build.py +++ b/build.py @@ -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 = {