mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-13 20:04:49 +02:00
Better error handling on failed upgrade if file corrupt
This commit is contained in:
@@ -178,7 +178,7 @@ func GithubUpdate(repo, appName, currentVersion string) (string, error) {
|
|||||||
// get the running binary
|
// get the running binary
|
||||||
oldExec, err := os.Executable()
|
oldExec, err := os.Executable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = replaceFile(oldExec, newExec); err != nil {
|
if err = replaceFile(oldExec, newExec); err != nil {
|
||||||
|
Reference in New Issue
Block a user