Skip to content

Commit

Permalink
do not append command if not set
Browse files Browse the repository at this point in the history
[FIXES JENKINS-30692]
  • Loading branch information
daspilker committed Oct 6, 2015
1 parent 102768a commit 03a153e
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -195,10 +195,12 @@ private String startBuildContainer(BuiltInContainer runInContainer, AbstractBuil

Map<String, String> links = new HashMap<String, String>();

String[] command = this.command.length() > 0 ? this.command.split(" ") : new String[0];

return runInContainer.getDocker().runDetached(runInContainer.image, workdir,
runInContainer.getVolumes(build), runInContainer.getPortsMap(), links,
environment, build.getSensitiveBuildVariables(), net,
command.split(" ")); // Command expected to hung until killed
command); // Command expected to hung until killed

} catch (InterruptedException e) {
throw new RuntimeException("Interrupted");
Expand Down

0 comments on commit 03a153e

Please sign in to comment.