Skip to content

Commit 45d5494

Browse files
committed
Quickfix command import issues
1 parent cf8488d commit 45d5494

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

daemon/daemon.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,21 @@ func (d *Daemon) InstallDaemonConfiguration() error {
9595
tmpConf["Group"] = group.Name
9696
}
9797

98+
d.logger.Debug().Msgf("Base command path: %s", d.config.BaseCommandPath)
9899
commands := strings.Split(d.config.BaseCommandPath, " ")
99100

100101
collectCmd := []string{}
101102

102103
// TODO: fix this thing, as it is absolutly not robust, and it might not work in all cases
103104
if len(commands) > 0 && commands[0] != "lda" {
104-
if strings.Contains(d.config.ExePath, commands[0]) {
105+
// Extract the executable name from ExePath
106+
executableName := filepath.Base(d.config.ExePath)
107+
108+
// Compare and adjust the commands slice
109+
if executableName == commands[0] {
105110
commands = commands[1:]
106111
}
112+
107113
for _, command := range commands {
108114
d.logger.Debug().Msgf("Checking command path: %s", command)
109115
collectCmd = append(collectCmd, command)

0 commit comments

Comments
 (0)