Re: [PATCH] t/test-lib.sh: do not trust $SHELL
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Sep 21, 2012, 21:34 UTC
- Message-ID
- <CALkWK0nLLEF7wnUhF0JUAZVP6GG3KHmuYSDZLPS7uGCZPfhV3w@mail.gmail.com>
- In-Reply-To
- <20120921211217.GA24134@sigill.intra.peff.net>
Hi Peff,
Jeff King wrote:
Show 11 quoted lines
> On Sat, Sep 22, 2012 at 02:37:38AM +0530, Ramkumar Ramachandra wrote: > >> > I don't think that is the right thing to do. The point of SHELL is to >> > point at a bourne-compatible shell. On some systems, the main reason to >> > set it is that /bin/sh is _broken_, and we are trying to avoid it. >> >> But you're only avoiding it in the --tee/ --va* codepath. In the >> normal codepath, you're stuck with /bin/sh anyway. > > 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? 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?
Ram