diff --git a/pkg/app/entry_point.go b/pkg/app/entry_point.go index fcffeb64b..ca445785b 100644 --- a/pkg/app/entry_point.go +++ b/pkg/app/entry_point.go @@ -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 {