Fix do_after cleanup path for Appbundler gem layout in Linux Habitat plan#171
Merged
Conversation
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 <ngupta@progress.com>
99d843d to
57030bd
Compare
ashiqueps
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
do_after()cleanup step inhabitat/plan.shso that.githubdirectories shipped inside vendored gem sources are properly removed from the final Habitat package.Background
After the Appbundler migration (#168), Bundler installs gems into
vendor/ruby/$VERSION/gems/rather than the old flatvendor/gems/path. The existingdo_after()function searched the old path ($pkg_prefix/vendor/gems) which no longer exists, so the cleanup was silently a no-op and gem-shipped workflow files remained in the package.Changes Made
findpath indo_after()from$pkg_prefix/vendor/gemsto$pkg_prefix/vendorto match the Appbundler-era directory layout-exec rm -rf {} +for safer and more efficient deletionFiles Modified
habitat/plan.sh— corrected cleanup path indo_after()Testing
$pkg_prefix/vendorin the artifacthabitat/plan.ps1) already uses the correct path and was not affected