Improve 'Install source not found' error in gemini-cli#28130
Closed
ompatel-aiml wants to merge 1 commit into
Closed
Improve 'Install source not found' error in gemini-cli#28130ompatel-aiml wants to merge 1 commit into
ompatel-aiml wants to merge 1 commit into
Conversation
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]
|
📊 PR Size: size/S
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.