Skip to content

Commit 58ff845

Browse files
author
Alexandru Scvortov
committed
move std{out,err} captures to where they're necessary
1 parent 3cf29ae commit 58ff845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/src/com/rabbitmq/tools/Host.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ private static String capture(InputStream is)
3939
public static void executeCommand(String command) throws IOException
4040
{
4141
Process pr = executeCommandProcess(command);
42-
String stdout = capture(pr.getInputStream());
43-
String stderr = capture(pr.getErrorStream());
4442

4543
int ev = waitForExitValue(pr);
4644
if (ev != 0) {
45+
String stdout = capture(pr.getInputStream());
46+
String stderr = capture(pr.getErrorStream());
4747
throw new IOException("unexpected command exit value: " + ev +
4848
"\nstdout:\n" + stdout +
4949
"\nstderr:\n" + stderr + "\n");

0 commit comments

Comments
 (0)