Navigation Menu

Skip to content

Commit

Permalink
[FIXED JENKINS-7219] EC2 slaves fail to launch when using old (< 1.9)…
Browse files Browse the repository at this point in the history
… configs
  • Loading branch information
Francis Upton IV committed Feb 15, 2012
1 parent 911f293 commit 9830909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
Expand Up @@ -126,7 +126,8 @@ else if (bootstrapResult == SAMEUSER)
scp.put(Hudson.getInstance().getJnlpJars("slave.jar").readFully(),
"slave.jar","/tmp");

String launchString = "java " + computer.getNode().jvmopts + " -jar /tmp/slave.jar";
String jvmopts = computer.getNode().jvmopts;
String launchString = "java " + (jvmopts != null ? jvmopts : "") + " -jar /tmp/slave.jar";
logger.println("Launching slave agent: " + launchString);
final Session sess = conn.openSession();
sess.execCommand(launchString);
Expand Down

0 comments on commit 9830909

Please sign in to comment.