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

Too many quotes in Win32 environment

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          omandel Olaf Mandel added a comment -

          Now cannot reproduce the problem: the command in the logs is the same (cmd.exe /C '"..."'), but now this gets executed without a problem.

          The xshell plugin was not changed but I probably upgraded to a new version of Jenkins (1.509.2): it is unclear which version produced the problem.

          It is also possible that my script was defective and produced the same error message when run by Jenkins as I got in my manual command line tests (the system cannot find the path).

          Anyhow: I am closing this bug report now.

          Show
          omandel Olaf Mandel added a comment - Now cannot reproduce the problem: the command in the logs is the same (cmd.exe /C '"..."'), but now this gets executed without a problem. The xshell plugin was not changed but I probably upgraded to a new version of Jenkins (1.509.2): it is unclear which version produced the problem. It is also possible that my script was defective and produced the same error message when run by Jenkins as I got in my manual command line tests (the system cannot find the path). Anyhow: I am closing this bug report now.
          Hide
          omandel Olaf Mandel added a comment -

          See last comment

          Show
          omandel Olaf Mandel added a comment - See last comment

            People

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

              Dates

              Created:
              Updated:
              Resolved: