Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-26531 Slave does not start if the temp dir is not set to
anything after upgrade to 1.25
  • Loading branch information
Francis Upton IV committed Jan 27, 2015
1 parent 8fc0046 commit 5357047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
Expand Up @@ -23,6 +23,7 @@
*/
package hudson.plugins.ec2.ssh;

import hudson.Util;
import hudson.ProxyConfiguration;
import hudson.model.Descriptor;
import hudson.model.Hudson;
Expand All @@ -40,6 +41,7 @@
import java.net.URL;

import jenkins.model.Jenkins;

import org.apache.commons.io.IOUtils;

import com.amazonaws.AmazonClientException;
Expand Down Expand Up @@ -102,7 +104,7 @@ else if (bootstrapResult == SAMEUSER) {

SCPClient scp = conn.createSCPClient();
String initScript = computer.getNode().initScript;
String tmpDir = (computer.getNode().tmpDir != null ? computer.getNode().tmpDir : "/tmp");
String tmpDir = (Util.fixEmptyAndTrim(computer.getNode().tmpDir) != null ? computer.getNode().tmpDir : "/tmp");

logger.println("Creating tmp directory (" + tmpDir + ") if it does not exist");
conn.exec("mkdir -p " + tmpDir, logger);
Expand Down

0 comments on commit 5357047

Please sign in to comment.