Skip to content

Fix Gemini CLI OAuth extraction on Windows#1

Open
RPG-fan wants to merge 1 commit intomainfrom
fix-gemini-cli-windows-oauth
Open

Fix Gemini CLI OAuth extraction on Windows#1
RPG-fan wants to merge 1 commit intomainfrom
fix-gemini-cli-windows-oauth

Conversation

@RPG-fan
Copy link
Owner

@RPG-fan RPG-fan commented Jan 31, 2026

This PR fixes the Gemini CLI OAuth credential extraction issue on Windows systems.

Problem

The extractGeminiCliCredentials() function was failing to properly extract OAuth credentials from the installed Gemini CLI on Windows because:

  • It was finding PowerShell scripts (.ps1) instead of Node.js executables
  • Directory traversal logic was incorrect for Windows npm global install paths

Solution

  • Added explicit Windows platform detection
  • Directly check npm global install path (%APPDATA%\npm\node_modules@google\gemini-cli)
  • Handle case where found executable is a .ps1 or .cmd file
  • Maintain fallback to original behavior for other platforms

Testing

  • Verified OAuth credentials can be extracted successfully on Windows
  • Confirmed gemini skill is now eligible in skills check
  • No impact on macOS/Linux functionality

Fixes the Windows compatibility issue for Gemini CLI OAuth authentication.

- Add Windows-specific path handling for npm global installs
- Handle PowerShell script (.ps1) and command (.cmd) file detection
- Maintain backward compatibility with existing behavior
- Fixes OAuth credential extraction for Windows users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant