mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-08 07:25:22 +02:00
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:
@@ -453,6 +453,9 @@ export const getApplicationInfo = async (
|
|||||||
appNames: string[],
|
appNames: string[],
|
||||||
serverId?: string,
|
serverId?: string,
|
||||||
) => {
|
) => {
|
||||||
|
if (appNames.length === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
let stderr = "";
|
let stderr = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user