Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Merge remote-tracking branch 'origin/feat/beacon-sh-auth' into feat/beacon-sh-auth

Justin D'Souza40a3d99e4a5f
diff --cc cli/beacon/internal/account/store.go
index 00e76c2c,83e9d99b..67685ab2
--- a/cli/beacon/internal/account/store.go
+++ b/cli/beacon/internal/account/store.go
@@@ -131,9 -136,19 +136,10 @@@ func Save(session Session) error
if err := tmp.Close(); err != nil {
return err
}
- // Windows does not replace an existing destination with os.Rename.
- if runtime.GOOS == "windows" {
- if err := os.Remove(path); err != nil && !errors.Is(err, os.ErrNotExist) {
- return err
- }
- // Old session is gone; keep the temp file if rename fails so the
- // new credential is not lost.
- removeTmp = false
- }
- if err := os.Rename(tmpPath, path); err != nil {
+ if err := replaceFile(tmpPath, path); err != nil {
return err
}
+ removeTmp = false
if runtime.GOOS != "windows" {
return os.Chmod(path, 0o600)
}