Skip to content
Permalink
Browse files
Fix JENKINS-12879
  • Loading branch information
gboissinot committed Feb 26, 2012
1 parent dc36330 commit e325d7655dde80483e8ea485090a36a24a38e773
Showing 1 changed file with 11 additions and 1 deletion.
@@ -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 {

0 comments on commit e325d76

Please sign in to comment.