Skip to content

Commit

Permalink
[FIXED JENKINS-42382] Add PATH+ANT to buildEnvVars(...)
Browse files Browse the repository at this point in the history
This ensures that Ant's bin directory ends up on the PATH when using
the Pipeline tool step. Note that Jenkins' environment variable
management will handle converting "/bin" on Windows if needed, we do
not need to do that explicitly.
  • Loading branch information
abayer committed Feb 28, 2017
1 parent e9815c3 commit 27ec2ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/hudson/tasks/Ant.java
Expand Up @@ -375,8 +375,10 @@ public String getAntHome() {
return getHome();
}

@Override
public void buildEnvVars(EnvVars env) {
env.put("ANT_HOME",getHome());
env.put("PATH+ANT", getHome() + "/bin");
}

/**
Expand Down

0 comments on commit 27ec2ff

Please sign in to comment.