]> arthur.barton.de Git - ansible-collection-boilerplate.git/commitdiff
Makefile.boilerplate: Try to remove empty "ansible_galaxy" folder on "distclean"
authorAlexander Barton <alex@barton.de>
Sun, 2 Jul 2023 19:34:01 +0000 (21:34 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 2 Jul 2023 19:34:01 +0000 (21:34 +0200)
Makefile.boilerplate

index 4c4c6d5248afef4b488582b21c6690c55435ecb7..bac3491fc5eee553d9b037429ada7bc195a6e9eb 100644 (file)
@@ -30,6 +30,8 @@ distclean-ansible:
        rm -fr "$(SOURCE_ROOT)"/.venv
 #      Remove Ansible Galaxy collections and roles
        rm -fr "$(SOURCE_ROOT)"/ansible_galaxy/ansible_collections "$(SOURCE_ROOT)"/ansible_galaxy/ansible_roles
+#      Try to remove the "ansible_galaxy" directory (if empty), but ignore errors.
+       rmdir "$(SOURCE_ROOT)"/ansible_galaxy || true
 #      Remove cache directory, used by the Ansible "facts cache" for example ...
        rm -fr "$(SOURCE_ROOT)"/.cache
 #      Clean up symlinked commands in dependant projects ...