@@ -22,7 +22,6 @@ import (
2222 "github.com/hashicorp/go-retryablehttp"
2323 "github.com/rs/zerolog/log"
2424 "github.com/spf13/afero"
25- "github.com/spf13/viper"
2625 "github.com/ulikunitz/xz"
2726 "go.mondoo.com/cnquery/v11/cli/config"
2827 "go.mondoo.com/cnquery/v11/logger/zerologadapter"
@@ -62,20 +61,9 @@ func init() {
6261
6362 LastProviderInstall = time .Now ().Unix ()
6463
65- viper .SetEnvPrefix ("mondoo" )
66- viper .AutomaticEnv ()
67-
68- autoUpdateEnabled := true
69- config .InitViperConfig ()
70- if viper .IsSet ("auto_update" ) {
71- autoUpdateEnabled = viper .GetBool ("auto_update" )
72- }
73-
74- coordinatorCfg := UpdateProvidersConfig {
75- Enabled : autoUpdateEnabled ,
76- RefreshInterval : 60 * 60 ,
77- }
78- Coordinator = newCoordinator (coordinatorCfg )
64+ // Initialize the global coordinator instance
65+ coordinator := newCoordinator ()
66+ Coordinator = coordinator
7967}
8068
8169type ProviderLookup struct {
@@ -948,9 +936,7 @@ func TryProviderUpdate(provider *Provider, update UpdateProvidersConfig) (*Provi
948936 log .Info ().
949937 Str ("installed" , provider .Version ).
950938 Str ("latest" , latest ).
951- Bool ("update is enabled" , update .Enabled ).
952939 Msg ("found a new version for '" + provider .Name + "' provider" )
953-
954940 provider , err = installVersion (provider .Name , latest )
955941 if err != nil {
956942 return nil , err
0 commit comments