From ae80a5aab4c9c8ada416d10e5b8e0f89355bcd54 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 10 Dec 2018 10:06:33 +0100 Subject: [PATCH] reject if gallery is not enabled --- .../extensionManagement/node/extensionGalleryService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index d8b418426c0..479b4f33278 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -473,6 +473,9 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } private queryGallery(query: Query, token: CancellationToken): Promise<{ galleryExtensions: IRawGalleryExtension[], total: number; }> { + if (!this.isEnabled()) { + return Promise.reject(new Error('No extension gallery service configured.')); + } return this.commonHeadersPromise.then(commonHeaders => { const data = JSON.stringify(query.raw); const headers = assign({}, commonHeaders, {