Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix JENKINS-12879
  • Loading branch information
gboissinot committed Feb 26, 2012
1 parent dc36330 commit e325d76
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -67,13 +67,23 @@ public Map<String, String> getEnvVars(AbstractBuild build, TaskListener listener
tool = (ToolInstallation) ((EnvironmentSpecific<?>) tool).forEnvironment(e);
}

result.put(tool.getName(), tool.getHome());
result.put(processToolName(tool.getName()), tool.getHome());
}
}
}
return result;
}

private String processToolName(String name) {
if (name == null) {
return null;
}

String result = name.replace("-", "_");
result = result.replace(" ", "_");
return result;
}

@Extension
public static class SharedObjectJobPropertyDescriptor extends EnvInjectJobPropertyContributorDescriptor {

Expand Down

0 comments on commit e325d76

Please sign in to comment.