Skip to content

Commit 7756452

Browse files
committed
Capture rabbitmqctl error output when listing commands
1 parent d0f077f commit 7756452

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ private static Process executeCommandProcess(String command) throws IOException
9292
}
9393

9494
public static boolean isRabbitMqCtlCommandAvailable(String command) throws IOException {
95-
Process process = rabbitmqctl("help");
96-
String stdout = capture(process.getInputStream());
97-
return stdout.contains(command);
95+
Process process = rabbitmqctlIgnoreErrors("");
96+
String stderr = capture(process.getErrorStream());
97+
return stderr.contains(command);
9898
}
9999

100100
public static Process rabbitmqctl(String command) throws IOException {

0 commit comments

Comments
 (0)