Skip to content

Improve 'Install source not found' error in gemini-cli#28130

Closed
ompatel-aiml wants to merge 1 commit into
google-gemini:mainfrom
ompatel-aiml:standup/2026-06-24-improve-install-source-error
Closed

Improve 'Install source not found' error in gemini-cli#28130
ompatel-aiml wants to merge 1 commit into
google-gemini:mainfrom
ompatel-aiml:standup/2026-06-24-improve-install-source-error

Conversation

@ompatel-aiml

Copy link
Copy Markdown
Contributor

Why

Better error messaging cuts user confusion when an install source is missing by pointing to the right GitHub URL and an auth fix.

What

Improved the 'Install source not found' error thrown by inferInstallMetadata in packages/cli/src/config/extension-manager.ts. The previous message was a bare 'Install source not found.' with no guidance; the new message echoes the offending source, points the user to the full 'https://github.com/owner/repo' URL form, and adds an authentication hint for private/SSO-protected repos (use an SSH key with SSO authorization or an 'sso://' URL). Updated the existing handler test in install.test.ts to assert against the new message and added a direct unit test in extension-manager.test.ts that exercises the real inferInstallMetadata function and verifies the GitHub URL suggestion, the auth hint, and the sso:// mention. Ran the cli package tests for both files plus typecheck and lint.

Changes

.../cli/src/commands/extensions/install.test.ts    | 10 +++++---
 packages/cli/src/config/extension-manager.test.ts  | 29 +++++++++++++++++++++-
 packages/cli/src/config/extension-manager.ts       | 13 +++++++---
 3 files changed, 44 insertions(+), 8 deletions(-)

Automated review — approve-with-nits

The change replaces the terse 'Install source not found.' error in inferInstallMetadata with a more actionable message that echoes the offending source and suggests the full GitHub URL form and SSO/auth remedies. It is low-risk, the new branch is purely a string change in an existing catch path, and it is covered by two new unit tests plus an updated install handler test; all targeted tests pass. A few minor inconsistencies and UX wording concerns are worth noting but none are blocking.

Risks: The new error text only fires in the non-git, local-path branch, so a simple mistyped local path now also surfaces GitHub/SSO guidance, which can be slightly confusing for genuinely local installs.; The catch block still labels every stat() failure (including permission or I/O errors, not just ENOENT) as 'Install source not found', so the more confident, detailed wording could now misdescribe non-existence vs. access errors. This is pre-existing behavior but the richer message makes the mismatch more noticeable.

Test gaps: install.test.ts hardcodes a shortened, hand-edited copy of the real error message in its mock (omitting the SSO/auth sentence); because inferInstallMetadata is fully mocked there, this passes but the duplicated string can silently drift from the real message over time.; No positive test asserting inferInstallMetadata still returns local metadata for an existing path alongside the new failure tests (pre-existing gap, not introduced by this change).

Generated by the Standup Orchestrator (task improve-install-source-error). Draft until reviewed in Obsidian.

Better error messaging cuts user confusion when an install source is missing by pointing to the right GitHub URL and an auth fix.

[standup improve-install-source-error · 2026-06-24]
@github-actions github-actions Bot added the size/s A small PR label Jun 24, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/S

  • Lines changed: 48
  • Additions: +42
  • Deletions: -6
  • Files changed: 3

@ompatel-aiml ompatel-aiml deleted the standup/2026-06-24-improve-install-source-error branch June 24, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant