From 57030bd2f9a98013786d2089ab567fb934d332af Mon Sep 17 00:00:00 2001 From: nikhil2611 Date: Mon, 8 Jun 2026 16:17:37 +0530 Subject: [PATCH] Fix do_after cleanup path for Appbundler gem layout After the Appbundler migration, bundler installs gems under vendor/ruby/$VERSION/gems/ instead of vendor/gems/. The existing do_after() search path was stale and never matched any directories, leaving workflow files from gem sources in the final package. Update the find path to search the full vendor/ tree so all gem-shipped .github directories are removed before packaging. Signed-off-by: nikhil2611 --- habitat/plan.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/habitat/plan.sh b/habitat/plan.sh index d4efdec..3b889c0 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -183,8 +183,9 @@ make_pkg_official_distrib() { do_after() { build_line "Removing .github directories from vendored gems..." - find "$pkg_prefix/vendor/gems" -type d -name ".github" \ - | while read github_dir; do rm -rf "$github_dir"; done + # Search the full vendor tree: bundler places gems under vendor/ruby/$VERSION/gems/ + # (not vendor/gems/ which was the pre-Appbundler layout) + find "$pkg_prefix/vendor" -type d -name ".github" -exec rm -rf {} + 2>/dev/null || true } do_strip() {