This commit is contained in:
ryan
2026-06-19 15:13:24 +08:00
parent 0b34792709
commit 32861c5db9
376 changed files with 3648 additions and 19957 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
//go:build !windows
// Package updater provides capabilities to check for, download, and apply updates.
package updater
import (
@@ -33,7 +34,7 @@ func replaceAndRestart(execPath string, tmpPath string) error {
if err := removeBackupBinary(backupPath); err != nil {
return err
}
if err := syscall.Exec(execPath, os.Args, os.Environ()); err != nil {
if err := syscall.Exec(execPath, os.Args, os.Environ()); err != nil { //nolint:gosec // execPath is the validated edge updater binary path
return fmt.Errorf("exec restart: %w", err)
}
return fmt.Errorf("unreachable after exec")
@@ -48,4 +49,4 @@ func removeBackupBinary(path string) error {
return err
}
return nil
}
}