Re: [PATCH 2/5] ci/lib: allow running in GitHub Actions
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Apr 10, 2020, 15:31 UTC
- Message-ID
- <20200410153131.GM2224@szeder.dev>
- In-Reply-To
- <nycvar.QRO.7.76.6.2004042207410.46@tvgsbejvaqbjf.bet>
On Sat, Apr 04, 2020 at 10:08:56PM +0200, Johannes Schindelin wrote:
Show 10 quoted lines
> > > + test macos != "$CI_OS_NAME" || CI_OS_NAME=osx > > > > Hmm, if "macos" isn't not equal to $CI_OS_NAME, then set > > CI_OS_NAME=osx. This is head-scratchingly backwards, and I think > > > > test "$CI_OS_NAME" = macos && CI_OS_NAME=osx > > > > would read better. > > I can understand where you come from, but your code is not `set -e` safe,
It works as expected in at least in dash, Bash, BusyBox sh, ksh, ksh93, mksh/lksh, yash, posh, FreeBSD /bin/sh, NetBSD /bin/sh. But it doesn't really matter.
This is not in the part of Git that should run on a wide variety of platforms, but only in our CI systems, where we do know which system and which shell we use, and we can rely on that it just works.
> which is the reason why I wrote the code this way (compare to the already > existing code in the previous clause, which was copy-edited here).
Didn't like it there, either.