From eee65aa88765485c16c1c932b5c96eb8814b6c31 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 27 Jul 2021 13:34:16 +0200 Subject: [PATCH] fix counting of directories find returns one directory per line, not an array. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 93d3c70..bb5aea0 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,7 @@ runs: run: | status=0 dirs=$(find . \( -name vendor -o -name '[._].*' -o -name node_modules \) -prune -o -name go.mod -print | sed 's:/go.mod$::') - len=${#dirs[@]} + len=$(echo "$dirs" | wc -l | tr -d ' ') for dir in $dirs; do pushd $dir > /dev/null if [[ $len > 1 ]]; then echo "::group::$dir"; fi