Fix CI failures: errcheck lint errors and flaky memory pressure test

This commit is contained in:
Steve Yegge
2025-10-24 00:27:07 -07:00
parent 1220304a61
commit e293974c71
6 changed files with 20 additions and 17 deletions

View File

@@ -544,7 +544,7 @@ func migrateToGlobalDaemon() {
os.Exit(1)
}
go cmd.Wait()
go func() { _ = cmd.Wait() }()
// Wait for daemon to be ready
time.Sleep(2 * time.Second)

View File

@@ -49,10 +49,10 @@ func acquireDaemonLock(beadsDir string, global bool) (*DaemonLock, error) {
}
// Write our PID to the lock file for debugging (optional)
f.Truncate(0)
f.Seek(0, 0)
_ = f.Truncate(0)
_, _ = f.Seek(0, 0)
fmt.Fprintf(f, "%d\n", os.Getpid())
f.Sync()
_ = f.Sync()
return &DaemonLock{file: f, path: lockPath}, nil
}
@@ -80,7 +80,7 @@ func tryDaemonLock(beadsDir string) (running bool, pid int) {
if data := make([]byte, 32); true {
n, _ := f.Read(data)
if n > 0 {
fmt.Sscanf(string(data), "%d", &pid)
_, _ = fmt.Sscanf(string(data), "%d", &pid)
}
}
return true, pid