]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Write absolute path in command -vV and type
authorjilles <jilles@FreeBSD.org>
Tue, 1 Sep 2020 13:19:15 +0000 (13:19 +0000)
committerjilles <jilles@FreeBSD.org>
Tue, 1 Sep 2020 13:19:15 +0000 (13:19 +0000)
commit6ea4b150e102c5a5648eafb37394437fff5c7b43
tree51509b07b46ed2cc7420d07314703ac18a191924
parent1e6762a3151645b547824b6b4e55c9bf7730b8ee
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]