mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 17:16:23 -04:00
Handle daemon mode before creating the app config
Daemon mode doesn't have any reason to read the user config or try to migrate it if it's old.
This commit is contained in:
parent
a54b3f0279
commit
4797734a1d
|
|
@ -97,6 +97,11 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
|||
// CONFIG_DIR env var above.
|
||||
logger := NewLogger(cliArgs.Debug)
|
||||
|
||||
if daemon.InDaemonMode() {
|
||||
daemon.Handle(logger)
|
||||
return
|
||||
}
|
||||
|
||||
if cliArgs.PrintVersionInfo {
|
||||
gitVersion := getGitVersionInfo()
|
||||
fmt.Printf("commit=%s, build date=%s, build source=%s, version=%s, os=%s, arch=%s, git version=%s\n", buildInfo.Commit, buildInfo.Date, buildInfo.BuildSource, buildInfo.Version, runtime.GOOS, runtime.GOARCH, gitVersion)
|
||||
|
|
@ -163,11 +168,6 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if daemon.InDaemonMode() {
|
||||
daemon.Handle(common.Log)
|
||||
return
|
||||
}
|
||||
|
||||
if cliArgs.Profile {
|
||||
go func() {
|
||||
if err := http.ListenAndServe("localhost:6060", nil); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue