diff mbox series

[wrynose,22/28] scripts/makefile-getvar: quote MAKEFILE variable

Message ID 023a9f3126936892f0df6ef236dcc4be2bff36b7.1779232800.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/28] README: Add wrynose subject-prefix to git-send-email suggestion | expand

Commit Message

Yoann Congal May 19, 2026, 11:29 p.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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c98243b8e2a5f1e538024131ca94991c5befc59f)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 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 e8a98327667..238d9567adc 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