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:
commit
fa08c6c2a2
5
main.go
5
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user