Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-14515] toEnvVars must respect the slave platform when …
…creating a new EnvVars object.
  • Loading branch information
jglick committed Sep 17, 2014
1 parent 8b09f8b commit 6698c8f
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -228,6 +228,8 @@ public Proc launch(ProcStarter starter) throws IOException {
vars = toEnvVars(starter.envs());
} catch (NullPointerException npe) {
vars = new EnvVars();
} catch (InterruptedException x) {
throw new IOException(x);
}

// Inject paths
Expand All @@ -253,8 +255,8 @@ public Proc launch(ProcStarter starter) throws IOException {
return getInner().launch(starter.envs(vars));
}

private EnvVars toEnvVars(String[] envs) {
EnvVars vars = new EnvVars();
private EnvVars toEnvVars(String[] envs) throws IOException, InterruptedException {
EnvVars vars = node.toComputer().getEnvironment();
for (String line : envs) {
vars.addLine(line);
}
Expand Down

0 comments on commit 6698c8f

Please sign in to comment.