Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public String awaitImageId(long timeout, TimeUnit timeUnit) {
}

private String getImageId() {
if (latestItem == null || !latestItem.isBuildSuccessIndicated()) {
if (latestItem == null) {
throw new DockerClientException("Could not build image");
} else if (!latestItem.isBuildSuccessIndicated()) {
throw new DockerClientException("Could not build image: " + latestItem.getError());
} else {
return latestItem.getImageId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public void awaitSuccess() {
throw new DockerClientException("", e);
}

if (latestItem == null || !latestItem.isPullSuccessIndicated()) {
if (latestItem == null) {
throw new DockerClientException("Could not pull image");
} else if (!latestItem.isPullSuccessIndicated()) {
throw new DockerClientException("Could not pull image: " + latestItem.getError());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public void awaitSuccess() {
throw new DockerClientException("", e);
}

if (latestItem == null || latestItem.isErrorIndicated()) {
if (latestItem == null) {
throw new DockerClientException("Could not push image");
} else if (latestItem.isErrorIndicated()) {
throw new DockerClientException("Could not push image: " + latestItem.getError());
}
}
Expand Down