Skip to content

Commit 65bbce6

Browse files
committed
open setting on custom
1 parent 38cf73e commit 65bbce6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/commands/sovereignCloud/SovereignCloudSetStep.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils";
7+
import * as vscode from 'vscode';
78
import { settingUtils } from "../../utils/settingUtils";
89
import { ConfigureSovereignCloudContext } from "./ConfigureSovereignCloudContext";
910

1011
export class SovereignCloudSetStep extends AzureWizardExecuteStep<ConfigureSovereignCloudContext> {
1112
public priority: number = 10;
1213

1314
public async execute(context: ConfigureSovereignCloudContext): Promise<void> {
14-
await settingUtils.updateGlobalSetting('environment', context.sovereignCloud, 'microsoft-sovereign-cloud');
15+
if (context.sovereignCloud === 'custom') {
16+
await vscode.commands.executeCommand('workbench.action.openSettings', 'microsoft-sovereign-cloud');
17+
} else {
18+
await settingUtils.updateGlobalSetting('environment', context.sovereignCloud, 'microsoft-sovereign-cloud');
19+
}
1520
}
1621

1722
public shouldExecute(): boolean {

0 commit comments

Comments
 (0)