1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00

main: display an error message instead of panic when setup fails

This commit is contained in:
mingrammer 2018-09-14 00:23:11 +09:00
parent eb4b5cd43b
commit 3cf84a5af1

View File

@ -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()