mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 10:31:16 -07:00
dont attempt to look up releases on github for non-github git uris (#9235)
This commit is contained in:
@@ -87,7 +87,7 @@ export function parseGitHubRepoForReleases(source: string): {
|
||||
const parsedUrl = URL.parse(source, 'https://github.com');
|
||||
// The pathname should be "/owner/repo".
|
||||
const parts = parsedUrl?.pathname.substring(1).split('/');
|
||||
if (parts?.length !== 2) {
|
||||
if (parts?.length !== 2 || parsedUrl?.host !== 'github.com') {
|
||||
throw new Error(
|
||||
`Invalid GitHub repository source: ${source}. Expected "owner/repo" or a github repo uri.`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user