forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-38447: [CI][Release] Don't use "|| {exit,continue}" (apache#…
…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. * Closes: apache#38447 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
- Loading branch information
Showing
1 changed file
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters