diff --git a/finddeps.in b/finddeps.in
index ec8cde4f05fc6b52686ce433c0266a2393a05dae..3f4515bea6d5a210afe3461a1182477f53ca5723 100644
--- a/finddeps.in
+++ b/finddeps.in
@@ -14,7 +14,7 @@ if [[ -z $match ]]; then
 	exit 0
 fi
 
-for d in "$(find . -type d)"; do
+find . -type d | while read d; do
 	if [[ -f "$d/PKGBUILD" ]]; then
 		unset pkgname depends makedepends
 		. "$d/PKGBUILD"