Skip to content

Commit f16398c

Browse files
committed
Fix base path detection when importing lda command
1 parent f7a1959 commit f16398c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

daemon/daemon.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,23 @@ func (d *Daemon) InstallDaemonConfiguration() error {
9797

9898
commands := strings.Split(d.config.BaseCommandPath, " ")
9999

100-
basePath := BaseCollectCommand
100+
collectCmd := []string{}
101101

102102
if len(commands) > 0 && commands[0] != "lda" {
103-
104-
var path string
105103
for _, command := range commands {
106104
d.logger.Debug().Msgf("Checking command path: %s", command)
105+
collectCmd = append(collectCmd, command)
107106
if command == "lda" {
108107
break
109108
}
110-
path = path + command + " "
111109
}
112110

113-
basePath = path + basePath
114111
}
115112

116-
d.logger.Info().Msgf("Base path: %s", basePath)
113+
collectCmd = append(collectCmd, BaseCollectCommand)
114+
115+
d.logger.Info().Msgf("Base path: %v", collectCmd)
117116

118-
collectCmd := []string{
119-
basePath,
120-
}
121117
if d.config.AutoCredential {
122118
collectCmd = append(collectCmd, "-a")
123119
}

0 commit comments

Comments
 (0)