fix(swarm): guard getApplicationInfo against empty appNames array

When called with an empty array, `docker service ps` receives no
SERVICE argument and fails with "requires at least 1 argument".
Return early with [] when appNames is empty.
This commit is contained in:
Claude
2026-02-09 06:52:11 +00:00
parent 1d96c4d534
commit 84fb82ea99

View File

@@ -453,6 +453,9 @@ export const getApplicationInfo = async (
appNames: string[],
serverId?: string,
) => {
if (appNames.length === 0) {
return [];
}
try {
let stdout = "";
let stderr = "";