Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19112

Too many quotes in Win32 environment

XMLWordPrintable

      When translating a command-line for windows, one extra set of quotes gets added which prevents the execution of the command. I raised the log level and got the following example:

      Configured command-line:
      tools/ci-build_continuous_debug

      This gets converted by hudson.util.ArgumentListBuilder.toWindowsCommand(). The log output is created by calling ...toStringWithQuote():
      cmd.exe /C ""tools\ci-build_continuous_debug && exit %%ERRORLEVEL%%""

      After feeding this into a hudson.Launcher instance, the jobs console log shows:
      cmd.exe /C '"tools\ci-build_continuous_debug && exit %%ERRORLEVEL%%"'

      When manually entering the command, the correct string is:
      cmd.exe /C "tools\ci-build_continuous_debug && exit %%ERRORLEVEL%%"

      I don't know if this is important or not, but this happens with a slave running on Windows while the Jenkins server is running on Linux.

            Unassigned Unassigned
            omandel Olaf Mandel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: