Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-05-26 10:31:37 -07:00
parent e040851a4c
commit 7a3d3db7ac
13 changed files with 125 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ func replaceBinary(dst, src string) error {
// Try to roll back the running binary swap.
_ = os.Rename(oldPath, dst)
_ = os.Remove(staging)
return fmt.Errorf("cannot install new binary at %s: %w", dst, err)
}
@@ -68,5 +69,6 @@ func CleanupAfterRestart(exePath string) {
if exePath == "" {
return
}
_ = os.Remove(exePath + oldSuffix)
}