diff --git a/cmd/status/metrics_disk.go b/cmd/status/metrics_disk.go index 39a0a9d..b934c8a 100644 --- a/cmd/status/metrics_disk.go +++ b/cmd/status/metrics_disk.go @@ -332,6 +332,9 @@ func getFinderStartupDiskFreeBytes() (free, total uint64, err error) { out, err := runCmd(ctx, "osascript", "-e", `tell application "Finder" to return {free space of startup disk, capacity of startup disk}`) if err != nil { + // Cache the failure timestamp so repeated calls within diskCacheTTL + // return immediately instead of each waiting the full 5s timeout. + finderDiskCachedAt = time.Now() return 0, 0, err }