diff options
author | Andrei Miulescu <lusu777@gmail.com> | 2018-08-12 21:04:47 +1000 |
---|---|---|
committer | Andrei Miulescu <lusu777@gmail.com> | 2018-08-12 21:04:47 +1000 |
commit | e8eb78617c17d8b743fcb17c0790c42e11cd5db5 (patch) | |
tree | 44f4f66047b7be5217d77f7fb34e34fb750e7f99 /main.go | |
parent | e65ddd7b6facfaf3ebc8b022f26066bdf96a28b0 (diff) |
Mid refactor change some more stuff
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 21 |
1 files changed, 1 insertions, 20 deletions
@@ -1,29 +1,22 @@ package main import ( - "errors" "flag" "fmt" "io/ioutil" "log" "os" - "os/exec" "os/user" "path/filepath" "github.com/davecgh/go-spew/spew" - "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/app" "github.com/jesseduffield/lazygit/pkg/config" git "gopkg.in/src-d/go-git.v4" ) -// ErrSubProcess is raised when we are running a subprocess var ( - ErrSubprocess = errors.New("running subprocess") - subprocess *exec.Cmd - commit string version = "unversioned" date string @@ -127,17 +120,5 @@ func main() { // TODO remove this once r, w not used setupWorktree() - app.Gui.Run() - - for { - if err := run(); err != nil { - if err == gocui.ErrQuit { - break - } else if err == ErrSubprocess { - subprocess.Run() - } else { - log.Panicln(err) - } - } - } + app.Gui.RunWithSubprocesses() } |