Skip to content

Commit 6f2b882

Browse files
committed
fix: errors of switching profiles
1 parent 780b45c commit 6f2b882

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/commands.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import * as fs from "fs-extra";
1818
import { Product } from "./types";
1919
import { codeSampleProvider } from "./plugins/generate";
2020
import { generateImport } from "./common/generateImport";
21+
import { getProfileInfoInstance } from "./profileManager";
2122

2223
const path = require("path");
2324

@@ -274,6 +275,8 @@ export class AlicloudApiCommands {
274275
});
275276

276277
vscode.commands.registerCommand("alicloud.api.restart", async () => {
278+
const profileInfo = await getProfileInfoInstance();
279+
await profileInfo.refreshProfiles();
277280
await vscode.window.withProgress(
278281
{
279282
location: vscode.ProgressLocation.Window,

0 commit comments

Comments
 (0)