Skip to content

Commit

Permalink
From EnvironmentAction.getProperty, an EnvironmentExpander has to app…
Browse files Browse the repository at this point in the history
…ly even to a contextual EnvVars with a definition of this variable.
  • Loading branch information
jglick committed Mar 27, 2015
1 parent cd30c06 commit bb86ec9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,19 @@ public Map<String,String> getOverriddenEnvironment() {

@Override public Object getProperty(String propertyName) {
try {
EnvironmentExpander expander = CpsThread.current().getContextVariable(EnvironmentExpander.class);
EnvVars overridden = CpsThread.current().getContextVariable(EnvVars.class);
if (overridden != null) {
if (expander != null) {
overridden = new EnvVars(overridden);
expander.expand(overridden);
}
String val = overridden.get(propertyName);
if (val != null) {
return val;
}
}
EnvVars environment = getEnvironment();
EnvironmentExpander expander = CpsThread.current().getContextVariable(EnvironmentExpander.class);
if (expander != null) {
expander.expand(environment);
}
Expand Down

0 comments on commit bb86ec9

Please sign in to comment.