Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] t/test-lib.sh: do not trust $SHELL

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:50

Ramkumar Ramachandra [off-list ref] writes:
Hi Peff,

Jeff King wrote:
quoted
On Sat, Sep 22, 2012 at 02:37:38AM +0530, Ramkumar Ramachandra wrote:
quoted
quoted
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?
SHELL_PATH is always supposed to point to a Bourne that can be used
to run POSIXy shell scripts.  I think the fallback you pointed out
above assumes that the majority of people who type "make" use Bourne
compatibles as their $SHELL and the default is to help the majority.

It may not hurt to add a note to INSTALL for people who use $SHELL
that is not Bourne (csh and zsh users, but there may be others) that
they need to set SHELL_PATH, of course.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help