-
Bug
-
Resolution: Cannot Reproduce
-
Minor
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
Labels | Original: pipeline shell-command | New: shell-command |
Resolution | New: Cannot Reproduce [ 5 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Works for me with or without the space, using the built-in node on Ubuntu 22.04 for which sh is Dash (so I get bad as expected if the shebang is deleted altogether).