Re: [PATCH] test-lib: try harder to ensure a working jgit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 14, 2019 at 02:14:19AM +0000, brian m. carlson wrote:

> On Mon, May 13, 2019 at 10:05:20PM -0400, Todd Zullinger wrote:
> > diff --git a/t/test-lib.sh b/t/test-lib.sh
> > index 908ddb9c46..599fd70e14 100644
> > --- a/t/test-lib.sh
> > +++ b/t/test-lib.sh
> > @@ -1522,7 +1522,7 @@ test_lazy_prereq NOT_ROOT '
> >  '
> >  
> >  test_lazy_prereq JGIT '
> > -	type jgit
> > +	jgit --version
> >  '
> 
> I think this is an improvement, not only because of the reasons you
> mentioned, but because we remove the use of "type", which is not
> guaranteed to be present in a POSIX shell.

Isn't it? I have always treated it as the most-portable option for this
(compared to, say, `which`).  It is in POSIX as a utility (albeit marked
with XSI), which even says (in APPLICATION USAGE):

  Since type must be aware of the contents of the current shell
  execution environment (such as the lists of commands, functions, and
  built-ins processed by hash), it is always provided as a shell regular
  built-in.

All that said, I think Todd's patch makes perfect sense even without
wanting to avoid "type".

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux