Skip to content

Commit 18d5c77

Browse files
authored
fix: address windows deadlock issue when determining docker environment info (#4288)
1 parent ff15988 commit 18d5c77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,12 @@ public boolean supported(Map<String, String> parameters) {
189189
public DockerInfoDetails info() throws IOException, InterruptedException {
190190
// Runs 'docker info'.
191191
Process infoProcess = docker("info", "-f", "{{json .}}");
192+
InputStream inputStream = infoProcess.getInputStream();
192193
if (infoProcess.waitFor() != 0) {
193194
throw new IOException(
194195
"'docker info' command failed with error: " + getStderrOutput(infoProcess));
195196
}
196-
return JsonTemplateMapper.readJson(infoProcess.getInputStream(), DockerInfoDetails.class);
197+
return JsonTemplateMapper.readJson(inputStream, DockerInfoDetails.class);
197198
}
198199

199200
@Override

0 commit comments

Comments
 (0)