fix(scripts): resolve exclude_inherited_files bugs in profile file ha… #248
+27
−9
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 two bugs where
exclude_inherited_filesin profile config was ignored, causing excluded standards to still be processed.Details
Both bugs used pipes that created subshells where
excluded="true"didn't persist:get_profile_files()- exclusions ignored when generating Claude Code Skillsget_profile_file()- files from current profile returned without checking exclusionsFix: Replace pipes with process substitution and add exclusion check before returning files from current profile.
Linked item
Checklist
Documented steps to test
Create a profile that excludes standards:
Install the profile with Skills mode enabled:
Verify output does NOT include backend/frontend skills:
Without the fix, backend/frontend skills are incorrectly created. With the fix, they are properly excluded.
Notes for reviewers
File changed:
scripts/common-functions.sh(27 insertions, 9 deletions)Changes made:
get_profile_files()function - Fixed subshell bug:get_profile_file()function - Added exclusion check before returning files from current profile:get_profile_file()function - Also fixed subshell bug in inheritance exclusion check (same pattern as1.)Technical notes:
< <(...)or<<< "$var") keeps the loop in the current shell.Testing: Verified with a profile that excludes backend and frontend standards - confirmed excluded skills are not created and excluded files are not copied.
Impact: Low risk - fixes broken functionality, no behavior change for profiles without exclusions.