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

bad path environment set by Jenkins

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • core
    • None
    • Windows

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bananeweizen Michael Keppler
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: