Skip to content
Permalink
Browse files

[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 6698c8f0cd931bdd823d9e8c6325daf14f7103d7
@@ -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
@@ -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);
}

0 comments on commit 6698c8f

Please sign in to comment.
You can’t perform that action at this time.