The telemetry.js script should handle paths that contain spaces (#12078)

This commit is contained in:
Joseph Sheng
2026-01-09 08:07:57 +08:00
committed by GitHub
parent 4ab1b9895a
commit ffb80c2426

View File

@@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { execSync } from 'node:child_process';
import { execFileSync } from 'node:child_process';
import { join } from 'node:path';
import { existsSync, readFileSync } from 'node:fs';
import { GEMINI_DIR } from '@google/gemini-cli-core';
@@ -79,7 +79,7 @@ try {
console.log(`🚀 Running telemetry script for target: ${target}.`);
const env = { ...process.env };
execSync(`node ${scriptPath}`, {
execFileSync('node', [scriptPath], {
stdio: 'inherit',
cwd: projectRoot,
env,