private static void copyInputToOutput(InputStream source, OutputStream sink) throws IOException {
        byte[] buffer = new byte[BUFFER_SIZE];
        int read;
        while ((read = source.read(buffer, 0, BUFFER_SIZE)) >= 0) {
            sink.write(buffer, 0, read);
        }
    }
Helper to run a process.

<p>stderr is redirected to stdout when writing to {@code output} This method <em>does not</em> throw when a
non-zero exit code is encountered. For any more complex use cases, use {@link ProcessBuilder} directly.

@param args      List containing the program and the arguments.
@param directory Directory to use as the working directory.
@param input     Data to write to the stdin of the process. Use {@code null} to send no input.
@param output    Sink destination for lines from stdout and stderr of the process.
@param env       Environment variables to set, possibly overriding specific inherited variables.
@return          Returns the exit code of the process.
smithy-utils/src/main/java/software/amazon/smithy/utils/IoUtils.java