mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	main: display an error message instead of panic when setup fails
This commit is contained in:
		
							
								
								
									
										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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user