From c649890398bcceb38c4ae305146d9656d9618c05 Mon Sep 17 00:00:00 2001 From: Amir Omidi Date: Wed, 15 Apr 2020 14:04:43 -0700 Subject: [PATCH] Put cloud shell behind preview flag (#9995) --- extensions/azurecore/src/azureResource/commands.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/azurecore/src/azureResource/commands.ts b/extensions/azurecore/src/azureResource/commands.ts index 49df4198ce..239877da79 100644 --- a/extensions/azurecore/src/azureResource/commands.ts +++ b/extensions/azurecore/src/azureResource/commands.ts @@ -26,6 +26,12 @@ import { AzureAccount, Tenant } from '../account-provider/interfaces'; export function registerAzureResourceCommands(appContext: AppContext, tree: AzureResourceTreeProvider): void { appContext.apiWrapper.registerCommand('azure.resource.startterminal', async (node?: TreeNode) => { try { + const enablePreviewFeatures = appContext.apiWrapper.getConfiguration('workbench').get('enablePreviewFeatures'); + if (!enablePreviewFeatures) { + const msg = localize('azure.cloudTerminalPreview', "You must enable preview features in order to use Azure Cloud Shell."); + appContext.apiWrapper.showInformationMessage(msg); + return; + } if (!node || !(node instanceof AzureResourceAccountTreeNode)) { return; }