Re: in 2.19.2 t0061-run-command FAILs if . is in $PATH
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 29, 2018, 01:51 UTC
- Message-ID
- <xmqqpnuor6qs.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1811281041400.41@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> -test_expect_success 'run_command is restricted to PATH' ' > +test_lazy_prereq DOT_IN_PATH ' > + case ":$PATH:" in > + *:.:*) true;; > + *) false;; > + esac > +'
An empty element in the colon-separated list also serves as an instruction to pick up executable from $cwd, so
case ":$PATH:" in *:.:** | *::*) true ;; *) false ;; esac
perhaps.
Show 11 quoted lines
> +test_expect_success !DOT_IN_PATH 'run_command is restricted to PATH' ' > write_script should-not-run <<-\EOF && > echo yikes > EOF > -- snap -- > > If so, can you please provide a commit message for it (you can add my > Signed-off-by: line and your Tested-by: line). > > Thanks, > Johannes