diff --git a/.github/workflows/tree_sitter_maker.yml b/.github/workflows/tree_sitter_maker.yml index 826409b..a98d7eb 100644 --- a/.github/workflows/tree_sitter_maker.yml +++ b/.github/workflows/tree_sitter_maker.yml @@ -52,7 +52,7 @@ jobs: find . -type f -name '*python*' -exec bash -c 'mv "$0" "${0//python/mojo}"' {} \; # Then, rename directories - find . -depth -type d -name '*python*' -execdir bash -c 'mv "$1" "${1//python/mojo}"' bash {} \; + find . -type d -name '*python*' -exec bash -c 'for dir; do if ! find "$dir" -mindepth 1 -type d -name "*python*" | grep -q .; then mv "$dir" "${dir//python/mojo}"; fi; done' bash {} + - name: Restore backups run: |