Put cloud shell behind preview flag (#9995) (#9999)

This commit is contained in:
Amir Omidi
2020-04-16 15:08:02 -07:00
committed by GitHub
parent 2e127582bd
commit f4464f352f

View File

@@ -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;
}