agent: change disk.Partitions(false) to true - likely fixes empty partition list in docker as of gopsutil 4.26.2

This commit is contained in:
henrygd
2026-03-29 12:33:45 -04:00
parent 9f19afccde
commit 6a207c33fa

View File

@@ -1,6 +1,7 @@
package agent
import (
"context"
"log/slog"
"os"
"path/filepath"
@@ -273,7 +274,7 @@ func (a *Agent) initializeDiskInfo() {
hasRoot := false
isWindows := runtime.GOOS == "windows"
partitions, err := disk.Partitions(false)
partitions, err := disk.PartitionsWithContext(context.Background(), true)
if err != nil {
slog.Error("Error getting disk partitions", "err", err)
}