Skip to content

Commit

Permalink
fix: improve the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritika-Agrawal811 committed Apr 16, 2024
1 parent 8d64f8a commit 9eba275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/count_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 9eba275

Please sign in to comment.