bad path environment set by Jenkins

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Reproduction:

      Create a freestyle job. As only build step, have a Windows batch containing "set". Run and inspect the console output, look for the PATH environment variable.

      Result:

      Jenkins wrongly uses quotes when adding the current JRE path, e.g. in my case the PATH is shown like this
      Path=C:\Program Files\Java\jre6\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;"C:\Program Files\Java\jre6\bin"

      Every command which tries to modify the path during a Jenkins job will fail because of those wrong quotes, e.g. you can no longer run batch commands like

      setx PATH "%PATH%;c:\some\new\path" /m

      because the quotes are incorrectly nested.

      Running "set" outside Jenkins produces the same path without the quoted JRE path.

      Jenkins version 1.527

            Assignee:
            Unassigned
            Reporter:
            Michael Keppler
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: