From 852128f5513173bb19ab3c26bb186d471b141c1a Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Tue, 28 Nov 2023 08:18:48 +0100 Subject: [PATCH] fix(worker): default to disk 0 if /host/root not found In order to avoid displaying 0 disk space on some systems, we default to the first disk found --- packages/worker/src/services/system/system.executors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/services/system/system.executors.ts b/packages/worker/src/services/system/system.executors.ts index 38d43414..5069d2d7 100644 --- a/packages/worker/src/services/system/system.executors.ts +++ b/packages/worker/src/services/system/system.executors.ts @@ -37,7 +37,7 @@ export class SystemExecutors { } const disks = await si.fsSize(); - const disk0 = disks.find((disk) => disk.mount.startsWith('/host/root')); + const disk0 = disks.find((disk) => disk.mount.startsWith('/host/root')) || disks[0]; return { cpu: { load: currentLoad },