Skip to content

Commit 217ca12

Browse files
committed
fix(telemetry): disable automatically for CI
fixes #3736
1 parent 9ef53ad commit 217ca12

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/ionic/src/lib/command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { BaseCommand, LOGGER_LEVELS, LogUpdateOutputStrategy, OutputStrategy, StreamHandler, StreamOutputStrategy, TaskChain, generateCommandPath, unparseArgs } from '@ionic/cli-framework';
2+
import { TERMINAL_INFO } from '@ionic/cli-framework/utils/terminal';
23
import chalk from 'chalk';
34
import * as LogUpdate from 'log-update';
45

@@ -63,7 +64,7 @@ export abstract class Command extends BaseCommand<ICommand, INamespace, CommandM
6364
const runPromise = this.run(inputs, options, runinfo);
6465

6566
const telemetryPromise = (async () => {
66-
if (this.env.config.get('telemetry') !== false) {
67+
if (this.env.config.get('telemetry') !== false && !TERMINAL_INFO.ci) {
6768
const { Telemetry } = await import('./telemetry');
6869

6970
let cmdInputs: CommandLineInputs = [];

packages/ionic/src/lib/telemetry.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ export class Telemetry implements ITelemetry {
3737
}
3838

3939
async sendCommand(command: string, args: string[]): Promise<void> {
40-
if (this.config.get('telemetry')) {
41-
await sendMessage({ config: this.config, ctx: this.ctx }, { type: 'telemetry', data: { command, args } });
42-
}
40+
debug('Sending telemetry for command: %O %O', command, args);
41+
await sendMessage({ config: this.config, ctx: this.ctx }, { type: 'telemetry', data: { command, args } });
4342
}
4443
}
4544

0 commit comments

Comments
 (0)