File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments