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

Shell Task on Windows Slave Uses Incorrect /bin/sh

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      At https://github.com/hudson/hudson/blob/master/core/src/main/java/hudson/tasks/Shell.java#L139 the Shell task attempts to detect Windows, and if so, use "sh" instead of "/bin/sh". The problem is that this detection takes place on the Master, instead of on the Slave that is actually going to run the task. If this were fixed to detect correctly, lots of people's workarounds of globally setting the shell as plain "sh" could go away.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          changelog.html
          core/src/main/java/hudson/tasks/Shell.java
          http://jenkins-ci.org/commit/jenkins/415a2729a54bc65c696e06d804bffd658d16b5ea
          Log:
          [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html core/src/main/java/hudson/tasks/Shell.java http://jenkins-ci.org/commit/jenkins/415a2729a54bc65c696e06d804bffd658d16b5ea Log: [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.
          Hide
          dogfood dogfood added a comment -
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #620
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #734
          [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

          Kohsuke Kawaguchi : 6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f
          Files :

          • core/src/main/java/hudson/tasks/Shell.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #734 [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave. Kohsuke Kawaguchi : 6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f Files : core/src/main/java/hudson/tasks/Shell.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          changelog.html
          core/src/main/java/hudson/tasks/Shell.java
          http://jenkins-ci.org/commit/jenkins/415a2729a54bc65c696e06d804bffd658d16b5ea
          Log:
          [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html core/src/main/java/hudson/tasks/Shell.java http://jenkins-ci.org/commit/jenkins/415a2729a54bc65c696e06d804bffd658d16b5ea Log: [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          core/src/main/java/hudson/tasks/Shell.java
          http://jenkins-ci.org/commit/jenkins/6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f
          Log:
          [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: core/src/main/java/hudson/tasks/Shell.java http://jenkins-ci.org/commit/jenkins/6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f Log: [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          core/src/main/java/hudson/tasks/Shell.java
          http://jenkins-ci.org/commit/jenkins/6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f
          Log:
          [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: core/src/main/java/hudson/tasks/Shell.java http://jenkins-ci.org/commit/jenkins/6d8fd5450a823f0c7abe528bce6a36fd81d2ad5f Log: [FIXED JENKINS-8449] Use correct shell interpreter on Windows slave.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ccutrer Cody Cutrer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: