From c76cd357ca7a66230b8a27385f46a6b351c877bb Mon Sep 17 00:00:00 2001 From: thatben Date: Mon, 21 Apr 2025 11:14:54 +0200 Subject: [PATCH] fixing volume detection for vm environment --- src/services/fsService.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/services/fsService.js b/src/services/fsService.js index 67ac664..888eb67 100644 --- a/src/services/fsService.js +++ b/src/services/fsService.js @@ -9,12 +9,17 @@ export class FsService { Object.keys(devices).forEach(function (key) { var val = devices[key]; val.volumes.forEach(function (volume) { - mountPoints.push(volume.mountPoint); + const mount = volume.mountPoint; + if (mount != null && mount != undefined && mount.length > 0) { + mountPoints.push(volume.mountPoint); + } }); }); if (mountPoints.length < 1) { - throw new Error("Failed to detect file system devices."); + // In certain containerized environments, the devices don't reveal any + // useful mounts. We'll proceed under the assumption that '/' is valid here. + return ['/']; } return mountPoints; };