[client]: Add config flag to service to override default profile path (#4276)

[client]: Add config flag to service to override default profile path (#4276)
This commit is contained in:
hakansa
2025-08-05 12:33:43 +03:00
committed by GitHub
parent 348d981b2c
commit 9ccc13e6ea
10 changed files with 36 additions and 14 deletions

View File

@@ -75,7 +75,15 @@ func (a *ActiveProfileState) FilePath() (string, error) {
return filepath.Join(configDir, a.Name+".json"), nil
}
type ServiceManager struct{}
type ServiceManager struct {
}
func NewServiceManager(defaultConfigPath string) *ServiceManager {
if defaultConfigPath != "" {
DefaultConfigPath = defaultConfigPath
}
return &ServiceManager{}
}
func (s *ServiceManager) CopyDefaultProfileIfNotExists() (bool, error) {