Skip to content

Remove autoupdate using polling method #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 8, 2016
Prev Previous commit
Next Next commit
Handle error when looking for path
  • Loading branch information
matteosuppo committed Mar 1, 2016
commit 781d8aebd99f1c69a1dc925e1e500f92b8a73f00
8 changes: 7 additions & 1 deletion update.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ func updateHandler(c *gin.Context) {
return
}

path, err := osext.Executable()

if err != nil {
c.JSON(500, gin.H{"error": err.Error()})
return
}

c.JSON(200, gin.H{"success": "Please wait a moment while the agent reboots itself"})
path, _ := osext.Executable()
restart(path)
}