diff mbox series

scripts/makefile-getvar: quote MAKEFILE variable

Message ID 20260511101327.1171728-1-thomas.perrot@bootlin.com
State Under Review
Headers show
Series scripts/makefile-getvar: quote MAKEFILE variable | expand

Commit Message

Thomas Perrot May 11, 2026, 10:13 a.m. UTC
From: Thomas Perrot <thomas.perrot@bootlin.com>

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

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
---
 scripts/makefile-getvar | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/scripts/makefile-getvar b/scripts/makefile-getvar
index e8a983276676..238d9567adce 100755
--- a/scripts/makefile-getvar
+++ b/scripts/makefile-getvar
@@ -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