mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-16 00:45:18 +00: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 resultPatches = await findPatchesByEntityId(id, type);
|
||||||
const patches = resultPatches.filter((p) => p.enabled);
|
const patches = resultPatches.filter((p) => p.enabled);
|
||||||
|
|
||||||
|
if (patches.length === 0) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
let command = `echo "Applying ${patches.length} patch(es)...";`;
|
let command = `echo "Applying ${patches.length} patch(es)...";`;
|
||||||
|
|
||||||
for (const p of patches) {
|
for (const p of patches) {
|
||||||
|
|||||||
Reference in New Issue
Block a user