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

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

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: