Skip to content

Commit

Permalink
[FIXED JENKINS-13412] use hudson.util.ArgumentListBuilder#toWindowsCo…
Browse files Browse the repository at this point in the history
…mmand
  • Loading branch information
ndeloof committed Mar 22, 2013
1 parent 3458917 commit 3ce68c2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/hudson/plugins/gradle/Gradle.java
Expand Up @@ -204,12 +204,7 @@ private boolean performTask(boolean dryRun, AbstractBuild<?, ?> build, Launcher
env.put("GRADLE_USER_HOME", build.getWorkspace().getRemote());

if (!launcher.isUnix()) {
// on Windows, executing batch file can't return the correct error code,
// so we need to wrap it into cmd.exe.
// double %% is needed because we want ERRORLEVEL to be expanded after
// batch file executed, not before. This alone shows how broken Windows is...
args.prepend("cmd.exe", "/C");
args.add("&&", "exit", "%%ERRORLEVEL%%");
args = args.toWindowsCommand();
}

FilePath rootLauncher;
Expand Down

0 comments on commit 3ce68c2

Please sign in to comment.