File tree Expand file tree Collapse file tree 1 file changed +13
-22
lines changed
Expand file tree Collapse file tree 1 file changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -89,22 +89,20 @@ type Updater struct {
8989// BackgroundRun starts the update check and apply cycle.
9090func (u * Updater ) BackgroundRun () error {
9191 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
10695 }
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
108106}
109107
110108func fetch (url string ) (io.ReadCloser , error ) {
@@ -254,10 +252,3 @@ func (u *Updater) update() error {
254252
255253 return nil
256254}
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