Skip to content

Commit

Permalink
Fail fast when docker pull fails for the native builder image
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed May 31, 2023
1 parent ca7b622 commit 2c70555
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public void setup(boolean processInheritIODisabled) {
final ProcessBuilder pb = new ProcessBuilder(
Arrays.asList(containerRuntime.getExecutableName(), "pull", effectiveBuilderImage));
pullProcess = ProcessUtil.launchProcess(pb, processInheritIODisabled);
pullProcess.waitFor();
if (pullProcess.waitFor() != 0) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'");
}
} catch (IOException | InterruptedException e) {
throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'", e);
} finally {
Expand Down

0 comments on commit 2c70555

Please sign in to comment.