提交 cdc18ec5 编写于 作者: L limin wang

fixed JENKINS-8614 ProcessTreeTest fails on Windows

上级 47094903
......@@ -425,16 +425,17 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
@Override
public synchronized EnvVars getEnvironmentVariables() {
if(env==null)
if(env !=null)
return env;
env = new EnvVars();
try
{
try
{
env = new EnvVars(p.getEnvironmentVariables());
} catch (WinpException e)
{
LOGGER.log(FINE, "Failed to get environment variable ", e);
}
}
env.putAll(p.getEnvironmentVariables());
} catch (WinpException e)
{
LOGGER.log(FINE, "Failed to get environment variable ", e);
}
return env;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册