Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 08:52:28 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r509995 - head/Mk/Scripts
Message-ID:  <201908270852.x7R8qSJZ072859@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Aug 27 08:52:28 2019
New Revision: 509995
URL: https://svnweb.freebsd.org/changeset/ports/509995

Log:
  Prevent globbing before validating env vars.
  
  Submitted by:	dillon
  Obtained from:	dports (dragonfly)

Modified:
  head/Mk/Scripts/functions.sh

Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh	Tue Aug 27 07:48:54 2019	(r509994)
+++ head/Mk/Scripts/functions.sh	Tue Aug 27 08:52:28 2019	(r509995)
@@ -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." \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908270852.x7R8qSJZ072859>