diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-19 23:28:29 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-20 19:52:20 +1000 |
commit | d938a437a2a98370cc215da88b0195bf1d499dc6 (patch) | |
tree | 99e559188e2c2f6d322a028e8de0a2fb95e22892 /pkg/app/app.go | |
parent | 1e440019101bcd26ab425700274103ab5a1c1593 (diff) |
WIP auto updates
Diffstat (limited to 'pkg/app/app.go')
-rw-r--r-- | pkg/app/app.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go index aaa925e53..e1a26e13d 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -10,6 +10,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui" "github.com/jesseduffield/lazygit/pkg/i18n" + "github.com/jesseduffield/lazygit/pkg/updates" ) // App struct @@ -22,6 +23,7 @@ type App struct { GitCommand *commands.GitCommand Gui *gui.Gui Tr *i18n.Localizer + Updater *updates.Updater // may only need this on the Gui } func newLogger(config config.AppConfigurer) *logrus.Logger { @@ -60,7 +62,11 @@ func NewApp(config config.AppConfigurer) (*App, error) { if err != nil { return app, err } - app.Gui, err = gui.NewGui(app.Log, app.GitCommand, app.OSCommand, app.Tr, config) + app.Updater, err = updates.NewUpdater(app.Log, config, app.OSCommand) + if err != nil { + return app, err + } + app.Gui, err = gui.NewGui(app.Log, app.GitCommand, app.OSCommand, app.Tr, config, app.Updater) if err != nil { return app, err } |