Skip to content

Commit

Permalink
Set shared artifact directory to empty string if optinal argument is …
Browse files Browse the repository at this point in the history
…not given
  • Loading branch information
nbelliot committed Feb 20, 2020
1 parent 003fe2c commit 5c78415
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public NewPipelineJob(final StaplerRequest request, final StaplerResponse respon
nodeLabel = "master";
}

sharedArtifactDirectory = json.optString("sharedArtifactDir",null);
sharedArtifactDirectory = json.optString("sharedArtifactDir","");
pipelineSCM = json.optString("scmSnippet","").trim();
singleCheckout = json.optBoolean("singleCheckout", false);

Expand All @@ -122,8 +122,6 @@ public NewPipelineJob(final StaplerRequest request, final StaplerResponse respon

if (sharedArtifactDirectory.length() != 0) {
sharedArtifactDirectory = "--workspace="+sharedArtifactDirectory.replace("\\","/");
} else {
sharedArtifactDirectory = "";
}

/* absoulte path and SCM checkout of manage project conflicts with
Expand Down

0 comments on commit 5c78415

Please sign in to comment.