Skip to content

Commit 4b99584

Browse files
authored
fix(config): sendTelemetry ignored on config merge (#1576)
1 parent e6fa6ad commit 4b99584

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

scw/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ func MergeProfiles(original *Profile, others ...*Profile) *Profile {
324324
DefaultProjectID: original.DefaultProjectID,
325325
DefaultRegion: original.DefaultRegion,
326326
DefaultZone: original.DefaultZone,
327+
SendTelemetry: original.SendTelemetry,
327328
}
328329

329330
for _, other := range others {
@@ -351,6 +352,9 @@ func MergeProfiles(original *Profile, others ...*Profile) *Profile {
351352
if other.DefaultZone != nil {
352353
np.DefaultZone = other.DefaultZone
353354
}
355+
if other.SendTelemetry != nil {
356+
np.SendTelemetry = other.SendTelemetry
357+
}
354358
}
355359

356360
return np

scw/config_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ profiles:
478478
testhelpers.AssertNoError(t, err)
479479
testhelpers.Equals(t, `access_key: SCW234567890ABCDEFGH
480480
secret_key: 6f6e6574-xxxx-xxxx-xxxx-xxxxxxxxxxxx
481+
send_telemetry: true
481482
`, p.String())
482483
testhelpers.Equals(t, v2ValidSecretKey2, *p.SecretKey)
483484
}

0 commit comments

Comments
 (0)