From 90e0ca8561e7a246a8a33b4d3d06e709bfe693b0 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 10 Jan 2021 20:10:44 +0000 Subject: [PATCH] Ensure .git directories within modules are removed This was previously done automatically by the topfloor/composer-cleanup-vcs-dirs Composer plugin, though it's not yet Composer 2 compatible. Without this, `web/modules/contrib/plausible/.git` remains and causes the contrib modules directory to appear whenever `git status` is run. --- composer.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 632ff7c90..9411a4595 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,14 @@ }, "minimum-stability": "dev", "prefer-stable": true, - "scripts": {}, + "scripts": { + "post-install-cmd": [ + "rm -fr web/modules/contrib/*/.git" + ], + "post-update-cmd": [ + "rm -fr web/modules/contrib/*/.git" + ] + }, "config": { "bin-dir": "bin", "sort-packages": true