mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
man: the exists function needs to validate the first parameter
This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion)
This commit is contained in:
parent
6edb14c006
commit
37be4197f7
|
@ -201,6 +201,10 @@ decho() {
|
|||
# Returns true if glob resolves to a real file and store the first
|
||||
# found filename in the variable $found
|
||||
exists() {
|
||||
if [ -z "$1" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
local IFS
|
||||
|
||||
# Don't accidentally inherit callers IFS (breaks perl manpages)
|
||||
|
|
Loading…
Reference in a new issue