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

Space required at the end of the interpreter in a shell step

      The following shell step only works if a space is added after 'bash'.

      sh label: 'with bash', script: '''#!/bin/bash 
       if [[ 0 = 0 ]]; then echo ok; else echo bad; fi
       '''

      Without the space the shebang line appears to be ignored.

      Having to end a line with a space is very counter-intuitive.

          [JENKINS-62726] Space required at the end of the interpreter in a shell step

          Bram Mertens created issue -
          Jesse Glick made changes -
          Labels Original: pipeline shell-command New: shell-command
          Jesse Glick made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            bram_mertens Bram Mertens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: