← Back to PRs

#10372: Fix google-gemini-cli-auth to work on Windows

by omribahumi open 2026-02-06 11:50 View on GitHub →
extensions: google-gemini-cli-auth stale
I ran into #4155/#2233/#4228 while playing around with openclaw today. I used Gemini to fix it, it fixed the issue for me. Tried polishing it to be pull request worthy, but if this is far from the repository standards feel free to reject. Hope this helps! <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Updates the google-gemini-cli-auth extension to locate `oauth2.js` using a new SDK helper (`resolveToolPackageFile`) instead of manual PATH/node_modules probing, improving Windows compatibility. - Introduces new infra utilities in `src/infra/module-resolution.ts` to resolve files within installed CLI tool packages (supports nested/hoisted deps via `createRequire`). - Exposes the new module-resolution helpers via `src/plugin-sdk/index.ts` so extensions can use them. - Adjusts OAuth credential extraction tests to mock the SDK helper rather than filesystem/PATH traversal, and adds a new test suite for the resolver helper itself. <h3>Confidence Score: 4/5</h3> - This PR is largely safe to merge, but the new test file has correctness/cleanliness issues that should be fixed first. - Core runtime changes are straightforward and scoped (credential extraction now delegates to a resolver helper). The main concerns are in the newly added module-resolution test: trailing whitespace flagged by `git diff --check` and a duplicated mock implementation that can make the test pass without exercising the intended behavior. - src/infra/module-resolution.test.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs