]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Write absolute path in command -vV and type
authorJilles Tjoelker <jilles@FreeBSD.org>
Tue, 1 Sep 2020 13:19:15 +0000 (13:19 +0000)
committerJilles Tjoelker <jilles@FreeBSD.org>
Tue, 1 Sep 2020 13:19:15 +0000 (13:19 +0000)
commitccd0a51fda561d10e091926a83e5bca0e6f41d6d
tree51509b07b46ed2cc7420d07314703ac18a191924
parent78ae1e6e15a5c4b5e7d18610a1a0daf44589063c
sh: Write absolute path in command -vV and type

POSIX is pretty clear that command -v, command -V and type shall write
absolute pathnames. Therefore, we need to prepend the current directory's
name to relative pathnames.

This can happen either when PATH contains a relative pathname or when the
operand contains a slash but is not an absolute pathname.
bin/sh/exec.c
bin/sh/tests/builtins/Makefile
bin/sh/tests/builtins/command13.0 [new file with mode: 0644]
bin/sh/tests/builtins/command14.0 [new file with mode: 0644]
bin/sh/tests/builtins/type4.0 [new file with mode: 0644]