File tree 1 file changed +13
-22
lines changed
1 file changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -89,22 +89,20 @@ type Updater struct {
89
89
// BackgroundRun starts the update check and apply cycle.
90
90
func (u * Updater ) BackgroundRun () error {
91
91
os .MkdirAll (u .getExecRelativeDir (u .Dir ), 0777 )
92
- if u .wantUpdate () {
93
- if err := up .CanUpdate (); err != nil {
94
- log .Println (err )
95
- return err
96
- }
97
- //self, err := osext.Executable()
98
- //if err != nil {
99
- // fail update, couldn't figure out path to self
100
- //return
101
- //}
102
- // TODO(bgentry): logger isn't on Windows. Replace w/ proper error reports.
103
- if err := u .update (); err != nil {
104
- return err
105
- }
92
+ if err := up .CanUpdate (); err != nil {
93
+ log .Println (err )
94
+ return err
106
95
}
107
- return errors .New ("Won't update because it's a development daemon. Change the version in main.go" )
96
+ //self, err := osext.Executable()
97
+ //if err != nil {
98
+ // fail update, couldn't figure out path to self
99
+ //return
100
+ //}
101
+ // TODO(bgentry): logger isn't on Windows. Replace w/ proper error reports.
102
+ if err := u .update (); err != nil {
103
+ return err
104
+ }
105
+ return nil
108
106
}
109
107
110
108
func fetch (url string ) (io.ReadCloser , error ) {
@@ -254,10 +252,3 @@ func (u *Updater) update() error {
254
252
255
253
return nil
256
254
}
257
-
258
- func (u * Updater ) wantUpdate () bool {
259
- // if strings.Contains(u.CurrentVersion, "dev") {
260
- // return false
261
- // }
262
- return true
263
- }
You can’t perform that action at this time.
0 commit comments