1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00

Prevent globbing before validating env vars.

Submitted by:	dillon
Obtained from:	dports (dragonfly)
This commit is contained in:
Baptiste Daroussin 2019-08-27 08:52:28 +00:00
parent 33b2dacaa7
commit 9ea8668beb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=509995

View File

@ -153,9 +153,11 @@ parse_plist() {
validate_env() {
local envfault
for i ; do
set -f
if ! (eval ": \${${i}?}" ) >/dev/null; then
envfault="${envfault}${envfault:+" "}${i}"
fi
set +f
done
if [ -n "${envfault}" ]; then
echo "Environment variable ${envfault} undefined. Aborting." \