From bd6d69c5a10baec87893416184297f1d7276380f Mon Sep 17 00:00:00 2001 From: Unrud Date: Tue, 14 Jun 2022 15:52:49 +0200 Subject: [PATCH] Makefile: More robust check-scripts Use **xargs** to pass results of **find** instead of word splitting. Word splitting fails when filenames contain white spaces (or if no files are found). --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6bb3de0bb2..23db6817d1 100644 --- a/Makefile +++ b/Makefile @@ -118,9 +118,7 @@ endif check-scripts: @echo @echo "Checking for Lua syntax errors..." - @luac -p $(shell find mods/*/maps/* -iname '*.lua') - @luac -p $(shell find lua/* -iname '*.lua') - @luac -p $(shell find mods/*/scripts/* -iname '*.lua') + @find lua/ mods/*/{maps,scripts}/ -iname "*.lua" -print0 | xargs -0n1 luac -p test: all @echo