From: Alexander Barton Date: Sun, 2 Jul 2023 19:34:01 +0000 (+0200) Subject: Makefile.boilerplate: Try to remove empty "ansible_galaxy" folder on "distclean" X-Git-Tag: rel-1-0-0~8 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c90b1bedb8fc804b4baf2e29a2768379618e39f2;p=ansible-collection-boilerplate.git Makefile.boilerplate: Try to remove empty "ansible_galaxy" folder on "distclean" --- diff --git a/Makefile.boilerplate b/Makefile.boilerplate index 4c4c6d5..bac3491 100644 --- a/Makefile.boilerplate +++ b/Makefile.boilerplate @@ -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 ...