From 07fecb6dcc35c1bb545cf75b5fb35cc157954a8b Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <art1@andreas-romeyke.de>
Date: Tue, 11 Oct 2022 18:25:12 +0200
Subject: [PATCH] - scan_dir() gets a dirname to check

---
 validate_workflow.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/validate_workflow.sh b/validate_workflow.sh
index 19424f5..1061a72 100755
--- a/validate_workflow.sh
+++ b/validate_workflow.sh
@@ -173,7 +173,7 @@ scan_file() {
 }
 
 scan_dir() {
-    find "$WATCH_FOLDER" -type f -print0| while IFS= read -r -d '' filename; do
+    find "$1" -type f -print0| while IFS= read -r -d '' filename; do
         scan_file "$filename"
     done
 }
@@ -188,5 +188,5 @@ if [ "$WITH_DAEMON" -eq 1 ]; then
 else
     # cli mode, scan watch folder once
     echo "checking dir $WATCH_FOLDER"
-    scan_dir
+    scan_dir "$WATCH_FOLDER"
 fi
-- 
GitLab