mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
feat(extensions): add support for sso:// protocol (#8581)
This commit is contained in:
@@ -99,6 +99,18 @@ describe('handleInstall', () => {
|
|||||||
expect(processSpy).toHaveBeenCalledWith(1);
|
expect(processSpy).toHaveBeenCalledWith(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should install an extension from a sso source', async () => {
|
||||||
|
mockInstallExtension.mockResolvedValue('sso-extension');
|
||||||
|
|
||||||
|
await handleInstall({
|
||||||
|
source: 'sso://google.com',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(consoleLogSpy).toHaveBeenCalledWith(
|
||||||
|
'Extension "sso-extension" installed successfully and enabled.',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('should install an extension from a local path', async () => {
|
it('should install an extension from a local path', async () => {
|
||||||
mockInstallExtension.mockResolvedValue('local-extension');
|
mockInstallExtension.mockResolvedValue('local-extension');
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ export async function handleInstall(args: InstallArgs) {
|
|||||||
if (
|
if (
|
||||||
source.startsWith('http://') ||
|
source.startsWith('http://') ||
|
||||||
source.startsWith('https://') ||
|
source.startsWith('https://') ||
|
||||||
source.startsWith('git@')
|
source.startsWith('git@') ||
|
||||||
|
source.startsWith('sso://')
|
||||||
) {
|
) {
|
||||||
installMetadata = {
|
installMetadata = {
|
||||||
source,
|
source,
|
||||||
|
|||||||
Reference in New Issue
Block a user