From: Jeff King Date: Tue, 23 Jan 2018 16:32:05 GMT Subject: Re: [PATCH 2/5] travis-ci: use 'set -e' in the 32 bit Linux build job Message-ID: <20180123163205.GA14626@sigill.intra.peff.net> In-Reply-To: <20180123162633.GE13068@sigill.intra.peff.net> On Tue, Jan 23, 2018 at 11:26:33AM -0500, Jeff King wrote: > > +HOST_UID=$1 > > +CI_USER=$USER > > +test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) > > If this "useradd" step fails, we wouldn't abort the script, because it's > part of a conditional. You'd need a manual "|| exit 1" at the end of > this line. Or to use a real "if" block. > > Reading this line, I'm also slightly confused by setting CI_USER in the > subshell, and then only using it once. Should it be respecting the outer > CI_USER setting? If not, should it just hard-code "ci" on the useradd > command-line? But that has nothing to do with your patch here. OK, nevermind on all this. I just read patch 4. :) -Peff