From b374dea935e49b11f0862d7623eab016d36ef4b0 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Mon, 17 Jul 2023 21:33:30 -0500 Subject: [PATCH] handle case of no connectors found --- main.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.sh b/main.sh index 9c1e943..dc30adc 100755 --- a/main.sh +++ b/main.sh @@ -41,6 +41,11 @@ if [ "$DEBUG" = "true" ]; then echo "Found YAMLs: $CONNECTORS" fi +if [ $(echo -n "$CONNECTORS" | wc -l) -eq 0 ]; then + echo "No connectors found" + exit +fi + FILES=$(for f in $CONNECTORS; do ORDER=$(yq e '.info.order' "$f") echo "$f $ORDER"