Re: [PATCH] t/test-lib.sh: do not trust $SHELL
- From
Jeff King <peff@peff.net>
- Date
- Sep 21, 2012, 22:15 UTC
- Message-ID
- <20120921221543.GA29100@sigill.intra.peff.net>
- In-Reply-To
- <CALkWK0nLLEF7wnUhF0JUAZVP6GG3KHmuYSDZLPS7uGCZPfhV3w@mail.gmail.com>
On Sat, Sep 22, 2012 at 03:04:50AM +0530, Ramkumar Ramachandra wrote:
Show 5 quoted lines
> > No, the #!-header is only information. When you run "make test" we > > actually invoke the shell ourselves using $SHELL_PATH. > > My SHELL_PATH is not set, and I can see SHELL_PATH ?= $(SHELL) in the > Makefile. Which shell is it supposed to point to?
Something bourne compatible. If you are on a sane system, /bin/sh is fine (and is the default).
> If you're proposing to use a variable that's only set in the Makefile > in the test, you're not allowing users to run the test as a > standalone- that's not a good change, is it?
It gets written to GIT-BUILD-OPTIONS, which should get pulled in by test-lib.sh. There may be an ordering problem with the command line parsing though.
-Peff