@@ -89,7 +89,7 @@ func makeTelemetryStateContext(ctx context.Context, cfg TelemetryConfig, hookFac
8989}
9090
9191// ReadTelemetryConfigOrDefault reads telemetry config from file or defaults if no config file found.
92- func ReadTelemetryConfigOrDefault (dataDir string , configDir string ) (cfg TelemetryConfig , err error ) {
92+ func ReadTelemetryConfigOrDefault (dataDir string , globalDir string ) (cfg TelemetryConfig , err error ) {
9393 err = nil
9494 dataDirProvided := dataDir != ""
9595 var configPath string
@@ -106,7 +106,7 @@ func ReadTelemetryConfigOrDefault(dataDir string, configDir string) (cfg Telemet
106106 // If the reason is because the directory doesn't exist or we didn't provide a data directory then...
107107 if (err != nil && os .IsNotExist (err )) || ! dataDirProvided {
108108
109- configPath = filepath .Join (configDir , TelemetryConfigFilename )
109+ configPath = filepath .Join (globalDir , TelemetryConfigFilename )
110110 cfg , err = LoadTelemetryConfig (configPath )
111111 }
112112
@@ -129,8 +129,8 @@ func ReadTelemetryConfigOrDefault(dataDir string, configDir string) (cfg Telemet
129129// EnsureTelemetryConfig creates a new TelemetryConfig structure with a generated GUID and the appropriate Telemetry endpoint
130130// Err will be non-nil if the file doesn't exist, or if error loading.
131131// Cfg will always be valid.
132- func EnsureTelemetryConfig (dataDir * string , configDir * string ) (TelemetryConfig , error ) {
133- cfg , _ , err := EnsureTelemetryConfigCreated (dataDir , configDir )
132+ func EnsureTelemetryConfig (dataDir * string , globalDir * string ) (TelemetryConfig , error ) {
133+ cfg , _ , err := EnsureTelemetryConfigCreated (dataDir , globalDir )
134134 return cfg , err
135135}
136136
0 commit comments