提交 8ee74364 编写于 作者: K kohsuke

Made a bit more robust.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36962 71c3de6d-444a-0410-be80-ed276b4c234a
上级 93a7d49e
......@@ -1724,7 +1724,10 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @since 1.305
*/
public EnvVars getEnvironment(TaskListener log) throws IOException, InterruptedException {
EnvVars env = Computer.currentComputer().getEnvironment().overrideAll(getCharacteristicEnvVars());
EnvVars env = getCharacteristicEnvVars();
Computer c = Computer.currentComputer();
if (c!=null)
env = c.getEnvironment().overrideAll(env);
String rootUrl = Hudson.getInstance().getRootUrl();
if(rootUrl!=null) {
env.put("HUDSON_URL", rootUrl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册