From 9eba27579c198f22249aece83c6a78beaec7f1ff Mon Sep 17 00:00:00 2001 From: Ritika Agrawal Date: Tue, 16 Apr 2024 16:20:34 +0530 Subject: [PATCH] fix: improve the condition --- .github/workflows/count_components.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/count_components.yml b/.github/workflows/count_components.yml index 22c11f6..e5f33d3 100644 --- a/.github/workflows/count_components.yml +++ b/.github/workflows/count_components.yml @@ -18,5 +18,5 @@ jobs: run: | #!/bin/bash # Count folders in the repository - folders=$(find . -mindepth 2 -maxdepth 2 -type d -name '[A-Z]*' ! -path '*/.*' -exec sh -c 'dirname="{}"; parent_dir=$(basename "$dirname"); [[ "$parent_dir" == [A-Z]* ]]' \; -print | wc -l) + folders=$(find . -mindepth 2 -maxdepth 2 -type d -name '[A-Z]*' ! -path '*/.*' -exec sh -c 'dirname="{}"; parent_dir=$(basename "$(dirname "$dirname")"); if [[ "$parent_dir" == [A-Z]* ]]; then echo "{}"; fi' \; | wc -l) echo "Number of folders: $folders" \ No newline at end of file