Skip to content
Permalink
Browse files

Merge pull request #284 from mingrammer/main-error

main: display an error message instead of panic when setup fails
  • Loading branch information...
jesseduffield committed Sep 13, 2018
2 parents eb4b5cd + 3cf84a5 commit fa08c6c2a2ea9f0e6fe6e628dcdeaa1868f36e6d
Showing with 3 additions and 2 deletions.
  1. +3 −2 main.go
@@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"path/filepath"
"runtime"
@@ -40,13 +41,13 @@ func main() {
}
appConfig, err := config.NewAppConfig("lazygit", version, commit, date, buildSource, debuggingFlag)
if err != nil {
panic(err)
log.Fatal(err.Error())
}

app, err := app.Setup(appConfig)
if err != nil {
app.Log.Error(err.Error())
panic(err)
log.Fatal(err.Error())
}

app.Gui.RunWithSubprocesses()

0 comments on commit fa08c6c

Please sign in to comment.
You can’t perform that action at this time.