Skip to content

Commit 50b0be5

Browse files
ymc9claude
andauthored
fix(ide): only error on missing telemetry token in CI (#2507)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cb49667 commit 50b0be5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/ide/vscode/scripts/post-build.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ dotenv.config({ path: './.env' });
66

77
const telemetryToken = process.env.VSCODE_TELEMETRY_TRACKING_TOKEN;
88
if (!telemetryToken) {
9-
console.error('Error: VSCODE_TELEMETRY_TRACKING_TOKEN environment variable is not set');
10-
process.exit(1);
9+
if (process.env.CI) {
10+
console.error('Error: VSCODE_TELEMETRY_TRACKING_TOKEN environment variable is not set');
11+
process.exit(1);
12+
} else {
13+
console.warn('Warning: VSCODE_TELEMETRY_TRACKING_TOKEN environment variable is not set, skipping token injection');
14+
process.exit(0);
15+
}
1116
}
1217
const file = 'dist/extension.js';
1318
let content = fs.readFileSync(file, 'utf-8');

0 commit comments

Comments
 (0)