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 6, 2013
1 parent 4709490 commit cdc18ec
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions core/src/main/java/hudson/util/ProcessTree.java
Expand Up @@ -425,16 +425,17 @@ public synchronized List<String> getArguments() {

@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;
}
});
Expand Down

0 comments on commit cdc18ec

Please sign in to comment.