fix(upgrader): remove test binary during commit restart process

This commit is contained in:
Jacky 2025-05-05 13:25:55 +00:00
parent 32fdc627bc
commit f04e02cd25
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -87,11 +87,12 @@ func (u *Upgrader) TestCommitAndRestart() error {
if runtime.GOOS != "windows" {
_ = os.Remove(oldExe)
_ = os.Remove(testBinaryPath)
}
// Wait for file to be written
time.Sleep(1 * time.Second)
// Gracefully restart
risefront.Restart()
return nil