Skip to content

Commit

Permalink
[FIXED JENKINS-28764] Add environment variables to binding context of…
Browse files Browse the repository at this point in the history
… Scriptler groovy scripts too (already in Groovy scripts)
  • Loading branch information
kinow committed Jun 28, 2015
1 parent 8765246 commit d57ac66
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -87,7 +87,8 @@ public Object eval() {
* @see org.biouno.unochoice.model.Script#eval(java.util.Map)
*/
public Object eval(Map<String, String> parameters) {
Map<String, String> evaledParameters = new HashMap<String, String>();
final Map<String, String> envVars = System.getenv();
Map<String, String> evaledParameters = new HashMap<String, String>(envVars);
// if we have any parameter that came from UI, let's eval and use them
if (parameters != null && parameters.size() > 0) {
// fill our map with the given parameters
Expand Down

1 comment on commit d57ac66

@skydavidshen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so how to get the environment in the active-choices script, can you give me a demo, thx

Please sign in to comment.