public static Process run()

in containers-docker-local/src/main/java/org/apache/aries/containers/docker/local/impl/ProcessRunner.java [51:70]


    public static Process run(Map<String, String> envVars, final File dir, String ... args) throws IOException {
        if ("true".equals(System.getProperty(SKIP_RUN))) {
            LOG.debug("Skipping the external command run as configured.");
            return null;
        }

        LOG.info("Executing shell command: {} with environment {}", args, envVars);

        ProcessBuilder builder = new ProcessBuilder(args);
        if ( dir != null ) {
            builder.directory(dir);
        }
        builder.redirectErrorStream(true);
        Map<String, String> environ = builder.environment();
        environ.putAll(envVars);

        Process process = builder.start();

        return process;
    }