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

Merge pull request #284 from mingrammer/main-error

main: display an error message instead of panic when setup fails
This commit is contained in:
Jesse Duffield 2018-09-14 09:38:21 +10:00 committed by GitHub
commit fa08c6c2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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