kou opened a new pull request, #38486:
URL: https://github.com/apache/arrow/pull/38486

   ### Rationale for this change
   
   If we use "|| {exit,continue}", "set -x" doesn't work.
   
   With "|| exit" ("false" in "a()" doesn't stop the shell execution):
   
   ```console
   $ cat /tmp/with-or-exit.sh
   set -e
   
   a()
   {
       false
       echo "a: failed after"
   }
   a || exit 1
   echo "top level"
   false
   echo "failed after"
   $ bash /tmp/with-or-exit.sh
   a: failed after
   top level
   ```
   
   Without "|| exit" ("false" in "a()" stops the shell execution):
   
   ```console
   $ cat /tmp/without-or-exit.sh
   set -e
   
   a()
   {
       false
       echo "a: failed after"
   }
   a
   echo "top level"
   false
   echo "failed after"
   $ bash /tmp/without-or-exit.sh
   ```
   ### What changes are included in this PR?
   
   * Remove needless `|| exit`
   * Use `if` instead of `|| continue`
   
   ### Are these changes tested?
   
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to