Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d1bbd28fb0
commit
416b921d71
3 files changed
+4
-4
No files matched your search
@@ -7,7 +7,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
// restart replaces this process with the new binary, with the same arguments and environment.
|
// Restart replaces this process with the new binary, with the same arguments and environment.
|
||||||
func restart(exe string) error {
|
func Restart(exe string) error {
|
||||||
return syscall.Exec(exe, os.Args, os.Environ())
|
return syscall.Exec(exe, os.Args, os.Environ())
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,6 @@ package selfupdate
|
|||||||
|
|
||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
func restart(string) error {
|
func Restart(string) error {
|
||||||
return errors.New("restarting in place is not supported on Windows")
|
return errors.New("restarting in place is not supported on Windows")
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ func (c *Config) defaults() {
|
|||||||
c.Verify = verifyRuns(c.App)
|
c.Verify = verifyRuns(c.App)
|
||||||
}
|
}
|
||||||
if c.Restart == nil {
|
if c.Restart == nil {
|
||||||
c.Restart = restart
|
c.Restart = Restart
|
||||||
}
|
}
|
||||||
c.Server = strings.TrimRight(c.Server, "/")
|
c.Server = strings.TrimRight(c.Server, "/")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user