Skip to content
Permalink
Browse files

Copy environment map to EnvVars.

JENKINS-37584
  • Loading branch information...
p4paul committed Oct 16, 2017
1 parent bafe194 commit 65279c9d1158fa247e406d6146ef8395d39906c6
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/main/java/org/jenkinsci/plugins/p4/build/P4EnvironmentContributor.java
@@ -33,13 +33,12 @@ public void buildEnvironmentFor(Run run, EnvVars env, TaskListener listener) thr

public static void buildEnvironment(TagAction tagAction, Map<String, String> map) {
// parts of Jenkins passes EnvVars as Map<String,String>
if (map instanceof EnvVars) {
EnvVars env = (EnvVars) map;
buildEnvironment(tagAction, env);
}
EnvVars env = new EnvVars(map);
buildEnvironment(tagAction, env);
map.putAll(env);
}

public static void buildEnvironment(TagAction tagAction, EnvVars env) {
private static void buildEnvironment(TagAction tagAction, EnvVars env) {
if (tagAction == null) {
return;
}

0 comments on commit 65279c9

Please sign in to comment.
You can’t perform that action at this time.