Preserve CLI include paths for empty resources#1500
Merged
ChiragAgg5k merged 1 commit intomasterfrom May 5, 2026
Merged
Conversation
Greptile Summary
Confidence Score: 5/5Safe to merge — minimal, targeted fix with correct logic and no regressions to adjacent code paths. The change is a clean removal of a flawed deletion of include paths; the surrounding logic (empty-array pruning, include file writing) is unchanged and unaffected. No new issues found. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Preserve CLI include paths for empty res..." | Re-trigger Greptile |
8798bf9 to
43aebec
Compare
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.
What does this PR do?
Preserves configured CLI
includesentries when an included resource array becomes empty during config writes.Previously
writeResolvedLocalConfigremoved an include path when the corresponding resource data was empty. That left the empty include file behind but removed the root config hint, so future CLI sessions would write new resources inline instead of back into the previously configured include file.This addresses the P1 review comment from appwrite/sdk-for-cli#305.
Test Plan
docker run --rm -v $(pwd):/app -w /app php:8.3-cli php example.php clicomposer lint-twiggit diff --check