Skip to content

Commit 6fdfdc0

Browse files
committed
fix: user agent defaults to true
1 parent d650275 commit 6fdfdc0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/core/src/shared/awsClientBuilderV3.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ export class AWSClientBuilderV3 {
112112
public async createAwsService<C extends AwsClient>(serviceOptions: AwsServiceOptions<C>): Promise<C> {
113113
const shim = this.getShim()
114114
const opt = (serviceOptions.clientOptions ?? {}) as AwsClientOptions
115-
115+
const userAgent = serviceOptions.userAgent ?? true
116116
if (!opt.region && serviceOptions.region) {
117117
opt.region = serviceOptions.region
118118
}
119119

120-
if (!opt.userAgent && serviceOptions.userAgent) {
120+
if (!opt.userAgent && userAgent) {
121121
opt.userAgent = [[getUserAgent({ includePlatform: true, includeClientId: true }), extensionVersion]]
122122
}
123123

packages/core/src/shared/clients/clientWrapper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export abstract class ClientWrapper<C extends AwsClient> implements vscode.Dispo
1616
) {}
1717

1818
protected async getClient(ignoreCache: boolean = false) {
19+
const args = { serviceClient: this.clientType, region: this.regionCode }
1920
return ignoreCache
20-
? await globals.sdkClientBuilderV3.createAwsService(this.clientType, undefined, this.regionCode)
21-
: await globals.sdkClientBuilderV3.getAwsService(this.clientType, undefined, this.regionCode)
21+
? await globals.sdkClientBuilderV3.createAwsService(args)
22+
: await globals.sdkClientBuilderV3.getAwsService(args)
2223
}
2324

2425
protected async makeRequest<CommandInput extends object, Command extends AwsCommand>(

0 commit comments

Comments
 (0)