Skip to content

Commit

Permalink
terraform: fix class cast exceptions when handling extraEnv values (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
brig authored Sep 23, 2021
1 parent c790b11 commit 1dd5cae
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public static Map<String, String> getEnv(Map<String, Object> cfg, Backend backen
m.putAll(backend.prepareEnv(cfg));

// user env
Map<String, String> extraEnv = MapUtils.getMap(cfg, TaskConstants.EXTRA_ENV_KEY, Collections.emptyMap());
Map<String, String> extraEnv = MapUtils.getMap(cfg, TaskConstants.EXTRA_ENV_KEY, Collections.emptyMap())
.entrySet().stream()
.filter(e -> e.getValue() != null)
.collect(Collectors.toMap(e -> e.getKey().toString(), e -> e.getValue().toString()));
m.putAll(extraEnv);

return m;
Expand Down

0 comments on commit 1dd5cae

Please sign in to comment.