Re: [PATCH v2] exec: Print absolute paths for command location queries

Herbert Xu <[email protected]> Sat, 13 Jun 2026 09:56:35 +0800
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On Sat, Jun 13, 2026 at 02:52:29AM +0100, Harald van Dijk wrote:
>
> You're overlooking the "that are found using the PATH variable" from the
> spec. Because you included a / in the command, it is not looked up from
> PATH. Modifying your test to make sure PATH is used, we can see that bash
> does do this in POSIX mode:
> 
> $ bash -c 'cd /; PATH=bin command -v bash'
> bin/bash
> $ bash -o posix -c 'cd /; PATH=bin command -v bash'
> /bin/bash

But that's not what this patch does, is it?

Cheers,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt