Process process = processBuilder.start();
ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.WARN, null);
int exitCode = waitForProcess(process, brjs.logger(CommandRunnerUtility.class));
processLogger.waitFor();
if(exitCode != 0) throw new CommandOperationException("Error while running command '" +
StringUtils.join(processBuilder.command(), " ") + "' (" + exitCode + ")");
}
catch(IOException | InterruptedException e) {
throw new CommandOperationException(e);
}
}