|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[JIRA] (JENKINS-9852) expr evaluating to zero stops shell script
b.w.doughe...@gmail.com (JIRA) Thu, 24 Jan 2013 10:23:56 -0800
- [JIRA] (JENKINS-9852) expr evaluating to ze... b.w.doughe...@gmail.com (JIRA)
- [JIRA] (JENKINS-9852) expr evaluating ... b.w.doughe...@gmail.com (JIRA)
This is actually the correct behavior. By default, Jenkins invokes /bin/sh with the -e (errexit) flag, and expr has an exit status of 1 when the _expression_ evaluates to zero.
Some potential ways to deal with this:
foo=`echo "$foo-1" | bc`