fix: add early return for empty patches in generateApplyPatchesCommand to prevent unnecessary command execution

This commit is contained in:
Mauricio Siu
2026-02-25 22:00:40 -06:00
parent 4af0bdc27b
commit e62bb7593a

View File

@@ -149,6 +149,10 @@ export const generateApplyPatchesCommand = async ({
const resultPatches = await findPatchesByEntityId(id, type);
const patches = resultPatches.filter((p) => p.enabled);
if (patches.length === 0) {
return "";
}
let command = `echo "Applying ${patches.length} patch(es)...";`;
for (const p of patches) {