Skip to content

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

Merged
scidomino merged 1 commit into
google-gemini:mainfrom
JohnJAS:bugfix
Jan 9, 2026
Merged

scidomino merged 1 commit into
google-gemini:mainfrom
JohnJAS:bugfix

Conversation

@JohnJAS

@JohnJAS JohnJAS commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

TLDR

Handle the case when the path contains spaces

Dive Deeper

Reviewer Test Plan

Set scriptPath with a space

Testing Matrix

🍏 🪟 🐧
npm run ❓ OK ❓
npx ❓ ❓ ❓
Docker ❓ ❓ ❓
Podman ❓ - -
Seatbelt ❓ - -

Linked issues / bugs

Fixes #12070

@JohnJAS
JohnJAS requested a review from a team as a code owner October 27, 2025 14:35
@google-cla

google-cla Bot commented Oct 27, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @JohnJAS, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical issue where the telemetry.js script would fail to execute if its file path contained spaces. The change ensures robust script execution by properly quoting the script's path when it is passed to the node command via execSync. This fix improves the reliability of the telemetry system across various environments where installation paths might include spaces.

Highlights

  • Path Handling: The telemetry.js script has been updated to correctly handle file paths that contain spaces. Previously, such paths would cause the script execution to fail.
  • Command Execution: The execSync command now wraps the scriptPath variable in double quotes, ensuring that the entire path, including any spaces, is treated as a single argument to the node executable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix an issue where the telemetry script fails if the path contains spaces by quoting the scriptPath. While this is a good step, the implementation is not fully robust as it doesn't handle other special characters like double quotes in paths. I've suggested a more robust way to escape the path to prevent potential failures. The change is correct in principle but can be improved for robustness.

Comment thread scripts/telemetry.js Resolved
@mrcabbage972
mrcabbage972 self-requested a review October 28, 2025 19:28
@JohnJAS
JohnJAS force-pushed the bugfix branch 2 times, most recently from f54a150 to 125ef9b Compare October 29, 2025 16:26
@JohnJAS

JohnJAS commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

@mrcabbage972 please have a review~

@scidomino
scidomino enabled auto-merge November 21, 2025 22:56
@gemini-cli gemini-cli Bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality labels Jan 8, 2026
@scidomino
scidomino added this pull request to the merge queue Jan 9, 2026
Merged via the queue into google-gemini:main with commit ffb80c2 Jan 9, 2026
sumansaurabh pushed a commit to sumansaurabh/gemini-cli that referenced this pull request Jan 9, 2026
thacio added a commit to thacio/auditaria that referenced this pull request Jan 24, 2026
kuishou68 pushed a commit to iOfficeAI/gemini-cli-pro that referenced this pull request Feb 27, 2026
@sripasg sripasg added the size/xs An extra small PR label Jun 2, 2026
software-0ficial pushed a commit to software-0ficial/gemini-cli that referenced this pull request Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality priority/p2 Important but can be addressed in a future release. size/xs An extra small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The telemetry.js script should handle paths that contain spaces

3 participants