Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
454 B
Raw Blame
//go:build !windows

package cli

import "os"

// replaceBinary swaps the running executable for the freshly-downloaded one.
// On Unix, the kernel keeps the old inode alive for the running process, so a
// plain rename is safe.
func replaceBinary(tmpPath, exePath string) error {
	return os.Rename(tmpPath, exePath)
}

// CleanupStaleUpdateArtifacts is a no-op on Unix — there are no sidecar files
// to reclaim.
func CleanupStaleUpdateArtifacts() {}