Skip to content
Browse files

[FIXED JENKINS-13412] use hudson.util.ArgumentListBuilder#toWindowsCo…

  • Loading branch information
ndeloof committed Mar 22, 2013
1 parent 3458917 commit 3ce68c23921a59b02d0159d9f7038941b88afada
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/main/java/hudson/plugins/gradle/
@@ -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;

0 comments on commit 3ce68c2

Please sign in to comment.
You can’t perform that action at this time.