Skip to content

Commit ffa15c2

Browse files
committed
fix errors
1 parent 4642538 commit ffa15c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/aws-cdk/lib/cli/telemetry/collect-telemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function canCollectTelemetry(args: any, context: Context): boolean {
77
if ((['true', '1'].includes(process.env.CDK_DISABLE_CLI_TELEMETRY ?? '')) ||
88
['false', false].includes(context.get('cli-telemetry')) ||
99
(args['version-reporting'] !== undefined && !args['version-reporting']) || /* aliased with telemetry option */
10-
(args._[0] === 'cli-telemetry' && args.disable)) /* special case for `cdk cli-telemetry --disable` */ {
10+
(Array.isArray(args._) && args._[0] === 'cli-telemetry' && args.disable)) /* special case for `cdk cli-telemetry --disable` */ {
1111
return false;
1212
}
1313

0 commit comments

Comments
 (0)