We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 108f7d2 + 508a0fc commit bd2e0e1Copy full SHA for bd2e0e1
update.go
@@ -36,6 +36,14 @@ import (
36
)
37
38
func updateHandler(c *gin.Context) {
39
+
40
+ path, err := osext.Executable()
41
42
+ if err != nil {
43
+ c.JSON(500, gin.H{"error": err.Error()})
44
+ return
45
+ }
46
47
var up = &updater.Updater{
48
CurrentVersion: version,
49
APIURL: *updateUrl,
@@ -45,14 +53,7 @@ func updateHandler(c *gin.Context) {
53
CmdName: *appName,
54
}
55
- err := up.BackgroundRun()
-
50
- if err != nil {
51
- c.JSON(500, gin.H{"error": err.Error()})
52
- return
- }
- path, err := osext.Executable()
56
+ err = up.BackgroundRun()
57
58
if err != nil {
59
c.JSON(500, gin.H{"error": err.Error()})
0 commit comments