Skip to content

Commit

Permalink
Fixed JENKINS-8614 ProcessTreeTest fails on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lmwang committed Apr 5, 2013
1 parent 70d8a6f commit 97c28e0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/main/java/hudson/util/ProcessTree.java
Expand Up @@ -424,7 +424,16 @@ public synchronized List<String> getArguments() {

@Override
public synchronized EnvVars getEnvironmentVariables() {
if(env==null) env = new EnvVars(p.getEnvironmentVariables());
if(env==null)
{
try
{
env = new EnvVars(p.getEnvironmentVariables());
} catch (WinpException e)
{
LOGGER.log(FINEST, "Failed to get environment variable ", e);
}
}
return env;
}
});
Expand Down

0 comments on commit 97c28e0

Please sign in to comment.