Thread (13 messages) flat view 13 messages, 4 authors, 2021-10-10

Re: [Buildroot] [RFC PATCH 0/2] use `command -v' instead of `which'

From: Petr Vorel <hidden>
Date: 2021-10-10 21:12:22

Hi all,
quoted
quoted
quoted
quoted
quoted
"Arnout" == Arnout Vandecappelle [off-list ref] writes:
Hi,
 >  From this, I actually conclude that it is indeed safer to go to
 > command -v, with a wrapper script that we add to $PATH to handle the
 > case where make tries to bypass the shell.
If command is always a shell builtin and we already do the dance to find
bash, how about just doing something like:
$(shell $(SHELL) -c "command -v ...")?
Peter, good point, thanks! That would safe us to modify path.
This works on make 4.3 on Debian with /bin/sh, I'll try to test it on more VMs
(+ find one where plain $(shell command -v ...) does not work).

Kind regards,
Petr
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help