From f16398c572805f1397a3ec21e204562aed9218a4 Mon Sep 17 00:00:00 2001 From: tzvonimir Date: Wed, 30 Oct 2024 13:13:47 +0100 Subject: [PATCH] Fix base path detection when importing lda command --- daemon/daemon.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 2d83389..54301c7 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -97,27 +97,23 @@ func (d *Daemon) InstallDaemonConfiguration() error { commands := strings.Split(d.config.BaseCommandPath, " ") - basePath := BaseCollectCommand + collectCmd := []string{} if len(commands) > 0 && commands[0] != "lda" { - - var path string for _, command := range commands { d.logger.Debug().Msgf("Checking command path: %s", command) + collectCmd = append(collectCmd, command) if command == "lda" { break } - path = path + command + " " } - basePath = path + basePath } - d.logger.Info().Msgf("Base path: %s", basePath) + collectCmd = append(collectCmd, BaseCollectCommand) + + d.logger.Info().Msgf("Base path: %v", collectCmd) - collectCmd := []string{ - basePath, - } if d.config.AutoCredential { collectCmd = append(collectCmd, "-a") }