Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Apr 24, 2012
1 parent add1dc3 commit 9f43a3a
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -9,6 +9,7 @@
import org.jenkinsci.lib.envinject.EnvInjectException;
import org.jenkinsci.lib.envinject.EnvInjectLogger;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;
Expand Down Expand Up @@ -157,7 +158,7 @@ public Map<String, String> getMergedVariables(Map<String, String> infraEnvVars,
variables.putAll(contribEnvVars);
variables.putAll(propertiesEnvVars);

//4-- Remove unset variables and return the resullt
//4-- Remove unset variables
return removeUnsetVars(variables);
}

Expand Down Expand Up @@ -207,7 +208,11 @@ private boolean isUnresolvedVar(String value) {
}

private String removeEscapeDollar(String value) {
return value.replace("\\$", "$");
//We replace escaped $ unless we are on Windows (Unix only)
if ('/' == File.separatorChar) { //unix test
return value.replace("\\$", "$");
}
return value;
}

}

0 comments on commit 9f43a3a

Please sign in to comment.