Skip to content

Commit

Permalink
[testcontainers#8006] direct stderr to null output when running crede…
Browse files Browse the repository at this point in the history
…ntial helper
  • Loading branch information
Smeb committed Dec 29, 2023
1 parent 36c8727 commit c79b55f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.testcontainers.DockerClientFactory;
import org.zeroturnaround.exec.InvalidResultException;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.stream.NullOutputStream;

import java.io.ByteArrayInputStream;
import java.io.File;
Expand Down Expand Up @@ -408,6 +409,7 @@ private String runCredentialProgram(String hostName, String credentialHelperName
return new ProcessExecutor()
.command(command)
.redirectInput(new ByteArrayInputStream(hostName.getBytes()))
.redirectError(NullOutputStream.NULL_OUTPUT_STREAM)
.readOutput(true)
.exitValueNormal()
.timeout(30, TimeUnit.SECONDS)
Expand Down

0 comments on commit c79b55f

Please sign in to comment.