static void executeCommand()

in src/main/java/org/apache/maven/doxia/DefaultConverter.java [418:426]


    static void executeCommand(String... commandAndArgs) throws IOException, InterruptedException {
        Process process = Runtime.getRuntime().exec(commandAndArgs);
        int exitCode = process.waitFor();
        if (exitCode != 0) {
            logOutput(process.getInputStream(), "");
            logOutput(process.getErrorStream(), "Error: ");
            throw new IOException("Command " + String.join(" ", commandAndArgs) + " failed with exit code " + exitCode);
        }
    }