fix: detect pnpm/pnpx in ~/.local#15254
Conversation
Summary of ChangesHello @rwakulszowa, 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 resolves a critical issue affecting the "gemini" CLI's auto-update mechanism on Ubuntu when installed globally via pnpm. Previously, such installations were misidentified as "npm" installations, preventing successful updates. The changes introduce more robust path detection for pnpm and pnpx, specifically targeting common installation directories like " Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request extends the detection logic for pnpm and pnpx to support installations on Ubuntu by adding checks for /.cache/pnpm/dlx and /.local/share/pnpm. No vulnerabilities or critical issues were found in the provided code changes. My review suggests making these path checks more robust to prevent potential false positives, specifically by using regular expressions for precise matching to improve correctness and reliability.
c6384d4 to
8d8b031
Compare
|
Hi @rwakulszowa, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Hi there! Thank you for your contribution to Gemini CLI. To improve our contribution process and better track changes, we now require all pull requests to be associated with an existing issue, as announced in our recent discussion and as detailed in our CONTRIBUTING.md. This pull request is being closed because it is not currently linked to an issue. You can easily reopen this PR once you have linked it to an issue. How to link an issue: Thank you for your understanding and for being a part of our community! |
|
Wait what? It is linked to an issue. It's been linked since the very beginning:
The Related to "keyword" comes directly from your documentation / default PR description (the stuff you guys put in the PR description whenever someone clicks Open a Pull Request):
Sundar please. Moderate impact. @bdmorgan wanna reopen this? Ftr., this "fixes" only a part of the issue (ubuntu + pnpm, potentially also Fedora). A proper fix is unlikely to ever happen - a JS tool auto updating itself was just a bad idea to begin with, imo. Or at least please update your default PR description, because this is misleading. |
|
"Relating" is not sufficient - it needs to be linked (i.e. shows up in the right-hand panel on the pull request page under "Development"). I reopened. I also modified the initial comment so that that issue is now properly linked. |
|
Actually I see what you're saying. you don't want to close the issue on close of this PR - you just want the link between them. Let me tweak the workflow so we can handle scenarios like this properly in the future. |
The workflow should now check any pull request update. If the update results in a "soft link" (i.e. |
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
Summary
Fixes a failure to detect pnpm installations on Ubuntu.
Details
Current behaviour: On Ubuntu,
geminiinstalled globally with pnpm (pnpm add -g @google-gemini/gemini-cli) thinks it was installed withnpm. Auto-updates always fail.New behaviour: On Ubuntu, global
geminiinstalled withpnpmauto-updates successfully.Related Issues
Related to #14298
How to Validate
Validation is tricky. I manually tested it with a hack, where:
pnpm add @google/gemini-cli@0.18)src/utils/installationInfo.jsfile to an updated versiongemini- it auto-updated to a new version using pnpm.Pre-Merge Checklist