diff --git a/scripts/patch.sh b/scripts/patch.sh
index 5cc79e0f2b6606c871c3752e958b2521bb5824e2..9a4a64bbae936cdac2021c38dd3e5ee019951c7c 100755
--- a/scripts/patch.sh
+++ b/scripts/patch.sh
@@ -9,7 +9,7 @@ for module in $GLUON_MODULES; do
 	cd "$1"/$module
 	git checkout -B patching base
 
-	if [ "$1"/patches/$module/*.patch ]; then
+	if [ "$(echo "$1"/patches/$module/*.patch)" ]; then
 		git am "$1"/patches/$module/*.patch || (
 			git am --abort
 			git checkout patched