Skip to content

Commit

Permalink
[FIXED JENKINS-5408] Quoting Issue with JDK Installer with Windows Slave
Browse files Browse the repository at this point in the history
(cherry picked from commit fd4ccc1)
  • Loading branch information
ssogabe authored and kohsuke committed Jun 19, 2013
1 parent 804c2ed commit 9976bdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/tools/JDKInstaller.java
Expand Up @@ -227,10 +227,10 @@ I tried to locate exactly how InstallShield parses the arguments (and why it use
ArgumentListBuilder args = new ArgumentListBuilder();
args.add(jdkBundle);
if (isJava15() || isJava14()) {
args.add("/s","/v/qn REBOOT=ReallySuppress INSTALLDIR=\\\""+ expectedLocation +"\\\" /L \\\""+logFile+"\\\"");
args.add("/s","/v/qn REBOOT=ReallySuppress INSTALLDIR=\""+ expectedLocation +"\" /L \""+logFile+"\"");
} else {
// modern version supports arguments in more sane format.
args.add("/s","/v","/qn","/L","\\\""+logFile+"\\\"","REBOOT=ReallySuppress","INSTALLDIR=\\\""+ expectedLocation+"\\\"");
args.add("/s","/v","/qn","/L","\""+logFile+"\"","REBOOT=ReallySuppress","INSTALLDIR=\""+ expectedLocation+"\"");
}
// according to http://community.acresso.com/showthread.php?t=83301, \" is the trick to quote values with whitespaces.
// Oh Windows, oh windows, why do you have to be so difficult?
Expand Down

0 comments on commit 9976bdf

Please sign in to comment.