Skip to content

Commit

Permalink
fix: address windows deadlock issue when determining docker environme…
Browse files Browse the repository at this point in the history
…nt info (#4288)
  • Loading branch information
mpeddada1 committed Jul 19, 2024
1 parent ff15988 commit 18d5c77
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ public boolean supported(Map<String, String> parameters) {
public DockerInfoDetails info() throws IOException, InterruptedException {
// Runs 'docker info'.
Process infoProcess = docker("info", "-f", "{{json .}}");
InputStream inputStream = infoProcess.getInputStream();
if (infoProcess.waitFor() != 0) {
throw new IOException(
"'docker info' command failed with error: " + getStderrOutput(infoProcess));
}
return JsonTemplateMapper.readJson(infoProcess.getInputStream(), DockerInfoDetails.class);
return JsonTemplateMapper.readJson(inputStream, DockerInfoDetails.class);
}

@Override
Expand Down

0 comments on commit 18d5c77

Please sign in to comment.