Skip to contentSkip to conversation

scripts/makefile-getvar: quote MAKEFILE variable

PATCH New [email protected] 1 participant 1 message May 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/makefile-getvar: quote MAKEFILE variable

From: Thomas Perrot <[email protected]>

$MAKEFILE was unquoted in the -f test and the error echo, causing word-splitting on paths that contain spaces.

---
 scripts/makefile-getvar | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/makefile-getvar +2 -2
index e8a983276676..238d9567adce 100755
@@ -20,8 +20,8 @@ fi
 MAKEFILE=$1
 shift
 
-if [ ! -f $MAKEFILE ]; then
-	echo $MAKEFILE is not a file
+if [ ! -f "$MAKEFILE" ]; then
+	echo "$MAKEFILE is not a file"
 	exit 1
 fi
 
Signature · 1 line
2.54.0