Subject: Re: [PATCH 2/5] ci/lib: allow running in GitHub Actions

From: Junio C Hamano <[email-masked]>
Date: Sun, 12 Apr 2020 15:25:11 -0700

Junio C Hamano <[email-masked]> writes:

> ...  Two 'test' before && may yield
> success or failure and they may control whether the assignment to
> CI_OS_NAME is done or skipped, but I expect that they do not affect
> how "set -e" behaves.

Heh, I should just have quoted from

  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09

Look for "set -e" where three bullet points are there.  The relevant
is the second one.

2. The -e setting shall be ignored when executing the compound list
   following the while, until, if, or elif reserved word, a pipeline
   beginning with the ! reserved word, or any command of an AND-OR
   list other than the last.

The test to see what the current value of CI_OS_NAME is is a command
of an AND list that is not the last one (the last one being the
assignment), so its failure does not allow "set -e" to abort the
shell.