This commit is contained in:
Louis Lam 2023-12-05 03:01:06 +08:00
parent bd5dd3c3ad
commit 607c908f2d
1 changed files with 6 additions and 1 deletions

View File

@ -297,7 +297,12 @@ export class Stack {
let res = await childProcessAsync.spawn("docker", [ "compose", "ls", "--all", "--format", "json" ], {
encoding: "utf-8",
});
let composeList = JSON.parse(res.toString());
if (!res.stdout) {
return statusList;
}
let composeList = JSON.parse(res.stdout.toString());
for (let composeStack of composeList) {
statusList.set(composeStack.Name, this.statusConvert(composeStack.Status));