mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix: add early return for empty patches in generateApplyPatchesCommand to prevent unnecessary command execution
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user