Skip to content

Commit

Permalink
Fix base path detection when importing lda command
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzvonimir committed Oct 30, 2024
1 parent f7a1959 commit f16398c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit f16398c

Please sign in to comment.