From 6f2b8823bc98483368bb2d570c68645b67ab02b4 Mon Sep 17 00:00:00 2001 From: yini-chen Date: Wed, 26 Jun 2024 15:36:27 +0800 Subject: [PATCH] fix: errors of switching profiles --- src/commands.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands.ts b/src/commands.ts index 3c7eef1..a3e05b0 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -18,6 +18,7 @@ import * as fs from "fs-extra"; import { Product } from "./types"; import { codeSampleProvider } from "./plugins/generate"; import { generateImport } from "./common/generateImport"; +import { getProfileInfoInstance } from "./profileManager"; const path = require("path"); @@ -274,6 +275,8 @@ export class AlicloudApiCommands { }); vscode.commands.registerCommand("alicloud.api.restart", async () => { + const profileInfo = await getProfileInfoInstance(); + await profileInfo.refreshProfiles(); await vscode.window.withProgress( { location: vscode.ProgressLocation.Window,