diff --git a/disk/disk_darwin.go b/disk/disk_darwin.go index 555ac3668..933cb0454 100644 --- a/disk/disk_darwin.go +++ b/disk/disk_darwin.go @@ -27,6 +27,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro // On 10.14, and possibly other OS versions, the actual count may // be less than from the first call. Truncate to the returned count // to prevent accessing uninitialized entries. + // https://github.com/shirou/gopsutil/issues/1390 fs = fs[:count] for _, stat := range fs { opts := []string{"rw"}