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

Cannot use /usr/bin/[ as a shell script step: wrapped in "..." after save

    Details

    • Similar Issues:

      Description

      1.479-SNAPSHOT. Create a freeform project, add a shell build step, and enter

      [ -n x ]
      

      for the script. (This should pass.) Now visit config.xml and you will see

          <hudson.tasks.Shell>
            <command>&quot;[ -n x ]&quot;</command>
          </hudson.tasks.Shell>
      

      which is clearly wrong and would fail:

      [test] $ /bin/sh -xe /tmp/hudson123.sh
      + [ -n x ]
      /tmp/hudson123.sh: 2: /tmp/hudson123.sh: [ -n x ]: not found
      Build step 'Execute shell' marked build as failure
      

      Workaround:

      test -n x
      

        Attachments

          Issue Links

            Activity

            Hide
            sogabe sogabe added a comment -

            @jglick: I have installed json-lib 2.1-rev8-SNAPSHOT, which contains your patch locally and re-built jenkins with it.it works.
            It is good idea to rebase json-lib, if it takes a long time, we should release it.

            Show
            sogabe sogabe added a comment - @jglick: I have installed json-lib 2.1-rev8-SNAPSHOT, which contains your patch locally and re-built jenkins with it.it works. It is good idea to rebase json-lib, if it takes a long time, we should release it.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I believe the fix is now integrated with json-lib:2.4-jenkins-1 getting into the trunk.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I believe the fix is now integrated with json-lib:2.4-jenkins-1 getting into the trunk.
            Hide
            jglick Jesse Glick added a comment -

            Does seem to be fixed now.

            Show
            jglick Jesse Glick added a comment - Does seem to be fixed now.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/f8f9462b6c4ed1c83da9fed53e88fe0b8d034890
            Log:
            JENKINS-14827 Noting.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/f8f9462b6c4ed1c83da9fed53e88fe0b8d034890 Log: JENKINS-14827 Noting.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2453
            JENKINS-14827 Noting. (Revision f8f9462b6c4ed1c83da9fed53e88fe0b8d034890)

            Result = SUCCESS
            Jesse Glick : f8f9462b6c4ed1c83da9fed53e88fe0b8d034890
            Files :

            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2453 JENKINS-14827 Noting. (Revision f8f9462b6c4ed1c83da9fed53e88fe0b8d034890) Result = SUCCESS Jesse Glick : f8f9462b6c4ed1c83da9fed53e88fe0b8d034890 Files : changelog.html

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: