Polish "Add support for environment variables"

Closes gh-12800
This commit is contained in:
Stephane Nicoll
2018-04-24 15:44:59 +02:00
parent 95f7e3ca37
commit 40b7e02793
13 changed files with 105 additions and 141 deletions

View File

@@ -69,12 +69,8 @@ public class RunProcess {
return run(waitForProcess, Arrays.asList(args), Collections.emptyMap());
}
public int run(boolean waitForProcess, String[] args, Map<String, String> environmentVariables) throws IOException {
return run(waitForProcess, Arrays.asList(args), environmentVariables);
}
protected int run(boolean waitForProcess, Collection<String> args, Map<String, String> environmentVariables)
throws IOException {
public int run(boolean waitForProcess, Collection<String> args,
Map<String, String> environmentVariables) throws IOException {
ProcessBuilder builder = new ProcessBuilder(this.command);
builder.directory(this.workingDirectory);
builder.command().addAll(args);