diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 20 |
1 files changed, 4 insertions, 16 deletions
@@ -4,9 +4,7 @@ import ( "flag" "fmt" "io/ioutil" - "log" "os" - "os/user" "path/filepath" "github.com/jesseduffield/lazygit/pkg/app" @@ -22,14 +20,6 @@ var ( versionFlag = flag.Bool("v", false, "Print the current version") ) -func homeDirectory() string { - usr, err := user.Current() - if err != nil { - log.Fatal(err) - } - return usr.HomeDir -} - func projectPath(path string) string { gopath := os.Getenv("GOPATH") return filepath.FromSlash(gopath + "/src/github.com/jesseduffield/lazygit/" + path) @@ -56,13 +46,11 @@ func main() { fmt.Printf("commit=%s, build date=%s, version=%s\n", commit, date, version) os.Exit(0) } - appConfig := &config.AppConfig{ - Name: "lazygit", - Version: version, - Commit: commit, - BuildDate: date, - Debug: *debuggingFlag, + appConfig, err := config.NewAppConfig("lazygit", version, commit, date, debuggingFlag) + if err != nil { + panic(err) } + app, err := app.NewApp(appConfig) app.Log.Info(err) app.GitCommand.SetupGit() |