Skip to content

Commit

Permalink
open setting on custom
Browse files Browse the repository at this point in the history
  • Loading branch information
motm32 committed Dec 6, 2024
1 parent 38cf73e commit 65bbce6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/commands/sovereignCloud/SovereignCloudSetStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
*--------------------------------------------------------------------------------------------*/

import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils";
import * as vscode from 'vscode';
import { settingUtils } from "../../utils/settingUtils";
import { ConfigureSovereignCloudContext } from "./ConfigureSovereignCloudContext";

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

public async execute(context: ConfigureSovereignCloudContext): Promise<void> {
await settingUtils.updateGlobalSetting('environment', context.sovereignCloud, 'microsoft-sovereign-cloud');
if (context.sovereignCloud === 'custom') {
await vscode.commands.executeCommand('workbench.action.openSettings', 'microsoft-sovereign-cloud');
} else {
await settingUtils.updateGlobalSetting('environment', context.sovereignCloud, 'microsoft-sovereign-cloud');
}
}

public shouldExecute(): boolean {
Expand Down

0 comments on commit 65bbce6

Please sign in to comment.