fix(cli): skip base files that are branch-specific items

When a file (folder.meta.yaml, settings.yaml, etc.) is configured as
a branch-specific item, the base file should be skipped and only the
branch-specific version (folder.branchName.meta.yaml) should be used.

Previously, base files were only skipped if a branch-specific version
was already processed, but they should always be skipped for specific
items regardless of processing order.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-01-21 12:05:40 +00:00
parent 23cf2834b3
commit fd2cb93cac

View File

@@ -1402,11 +1402,15 @@ export async function elementsToMap(
continue;
}
} else if (!isBranchSpecificFile(path)) {
// This is a regular base file, check if we should skip it
// This is a regular base file
if (processedBasePaths.has(path)) {
// Skip base file, we already processed branch-specific version
continue;
}
// If this base file is a specific item, skip it - we should only use branch-specific versions
if (isSpecificItem(path, specificItems)) {
continue;
}
map[path] = content;
}
} else {