Skip to content

Commit

Permalink
added some delays to see if that helps updates complete normally
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 13, 2021
1 parent b0bd4ed commit f402de4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ func (app *app) checkForUpdates(passive bool) {
})
return
}
// wait for the update to complete before
// restarting.
time.Sleep(1 * time.Second)
err = u.Restart()
if err != nil {
app.runtime.Dialog.Message(&dialog.MessageDialog{
Expand Down
2 changes: 2 additions & 0 deletions pkg/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ type Asset struct {
BrowserDownloadURL string `json:"browser_download_url"`
}

// appPathFromExecutable gets the .app path from the currently
// running executable.
func appPathFromExecutable(p string) (string, error) {
if !strings.HasSuffix(p, "/Contents/MacOS/xbar") {
return "", errors.New("executable not where it should be")
Expand Down

0 comments on commit f402de4

Please sign in to comment.