summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorAndrei Miulescu <lusu777@gmail.com>2018-08-12 21:04:47 +1000
committerAndrei Miulescu <lusu777@gmail.com>2018-08-12 21:04:47 +1000
commite8eb78617c17d8b743fcb17c0790c42e11cd5db5 (patch)
tree44f4f66047b7be5217d77f7fb34e34fb750e7f99 /main.go
parente65ddd7b6facfaf3ebc8b022f26066bdf96a28b0 (diff)
Mid refactor change some more stuff
Diffstat (limited to 'main.go')
-rw-r--r--main.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/main.go b/main.go
index aa157c108..a7d5d2eb5 100644
--- a/main.go
+++ b/main.go
@@ -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()
}