File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ func install(cmd *cobra.Command, _ []string) error {
348348 AutoCredential : autoCredentials ,
349349 IsWorkspace : isWorkspace ,
350350 ShellTypeToLocation : user .Conf .ShellTypeToLocation ,
351+ BaseCommandPath : cmd .CommandPath (),
351352 }
352353 dmn := daemon .NewDaemon (daemonConf , logging .Log )
353354
Original file line number Diff line number Diff line change 88 "os/exec"
99 "os/user"
1010 "path/filepath"
11+ "strings"
1112
1213 "github.com/devzero-inc/local-developer-analytics/config"
1314 "github.com/devzero-inc/local-developer-analytics/util"
@@ -46,6 +47,7 @@ type Config struct {
4647 AutoCredential bool
4748 IsWorkspace bool
4849 ShellTypeToLocation map [config.ShellType ]string
50+ BaseCommandPath string
4951}
5052
5153// Daemon is the service that configures background service
@@ -93,8 +95,28 @@ func (d *Daemon) InstallDaemonConfiguration() error {
9395 tmpConf ["Group" ] = group .Name
9496 }
9597
98+ commands := strings .Split (d .config .BaseCommandPath , " " )
99+
100+ basePath := BaseCollectCommand
101+
102+ if len (commands ) > 0 && commands [0 ] != "lda" {
103+
104+ var path string
105+ for _ , command := range commands {
106+ d .logger .Debug ().Msgf ("Checking command path: %s" , command )
107+ if command == "lda" {
108+ break
109+ }
110+ path = path + command + " "
111+ }
112+
113+ basePath = path + basePath
114+ }
115+
116+ d .logger .Info ().Msgf ("Base path: %s" , basePath )
117+
96118 collectCmd := []string {
97- BaseCollectCommand ,
119+ basePath ,
98120 }
99121 if d .config .AutoCredential {
100122 collectCmd = append (collectCmd , "-a" )
You can’t perform that action at this time.
0 commit comments