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

Malformed PATH environment variable on Windows slave (unix syntax used)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • customtools-plugin
    • None
    • Windows slave

      PATH without the plugin:

      Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;...
      

      PATH with the plugin:

      Path=C:\Users\developer\jenkins\tools\Custom_tool\Maven_3.0.4_for_non-maven_projects_\apache-maven-3.0.4:/C:\Users\developer\jenkins\tools\Custom_tool\Maven_3.0.4_for_non-maven_projects_\apache-maven-3.0.4/bin:C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;...
      

          [JENKINS-14515] Malformed PATH environment variable on Windows slave (unix syntax used)

          Konstantin Korotkov created issue -

          Ryan Campbell added a comment -

          Is the job running on the master? If not, what is the OS of the master?

          Ryan Campbell added a comment - Is the job running on the master? If not, what is the OS of the master?

          This particular job was running on a Windows slave, master is Linux. The job is part of multi-configuration project that runs on both Linux and Windows slaves.

          Konstantin Korotkov added a comment - This particular job was running on a Windows slave, master is Linux. The job is part of multi-configuration project that runs on both Linux and Windows slaves.

          Got the same problem, the other way around. My master is Windows and the Linux slave is getting a bad PATH environment variable, where the master's JAVA_HOME/bin got injected:

          PATH=D:\opt\jdk1.6.0_27/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
          

          I noticed the problem when I tried to launch a freestyle job on the slave, executing a shell script. Try the following script to exhibit the bad PATH:

          #!/bin/bash
          env
          

          Olivier Chédru added a comment - Got the same problem, the other way around. My master is Windows and the Linux slave is getting a bad PATH environment variable, where the master's JAVA_HOME/bin got injected: PATH=D:\opt\jdk1.6.0_27/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games I noticed the problem when I tried to launch a freestyle job on the slave, executing a shell script. Try the following script to exhibit the bad PATH: #!/bin/bash env

          Ronen Peleg added a comment -

          I have the same problem! On Windows slave and Jenkins installed on Linux O/S

          Path=D:\Jenkins\tools\Custom_tool\NodeJS-0.9.9:/var/lib/jenkins/D: ...

          Ronen Peleg added a comment - I have the same problem! On Windows slave and Jenkins installed on Linux O/S Path=D:\Jenkins\tools\Custom_tool\NodeJS-0.9.9:/var/lib/jenkins/D: ...

          Oleg Nenashev added a comment -

          Hello,

          I've resolved this issue.
          Pull request: https://github.com/jenkinsci/customtools-plugin/pull/2

          Best regards,
          Oleg Nenashev
          R&D Engineer, Synopsys Inc.
          www.synopsys.com

          Oleg Nenashev added a comment - Hello, I've resolved this issue. Pull request: https://github.com/jenkinsci/customtools-plugin/pull/2 Best regards, Oleg Nenashev R&D Engineer, Synopsys Inc. www.synopsys.com
          Oleg Nenashev made changes -
          Assignee Original: Ryan Campbell [ recampbell ] New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Oleg Nenashev added a comment -

          Resolved issue in the version 0.3

          Oleg Nenashev added a comment - Resolved issue in the version 0.3
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            oleg_nenashev Oleg Nenashev
            korotkov Konstantin Korotkov
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: