Skip to content

Commit

Permalink
Make use of registerIDFCommand
Browse files Browse the repository at this point in the history
- Renaming the function to clearly indicate it's async
  • Loading branch information
radurentea committed Jan 16, 2025
1 parent 7570f35 commit 87753b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ import {
IDFWebCommandKeys,
} from "./cmdTreeView/cmdStore";
import { IdfSetup } from "./views/setup/types";
import { removeEspIdfSettings } from "./uninstall";
import { asyncRemoveEspIdfSettings } from "./uninstall";

// Global variables shared by commands
let workspaceRoot: vscode.Uri;
Expand Down Expand Up @@ -3731,12 +3731,7 @@ export async function activate(context: vscode.ExtensionContext) {
checkAndNotifyMissingCompileCommands();

// Remove ESP-IDF settings
context.subscriptions.push(
vscode.commands.registerCommand(
"espIdf.removeEspIdfSettings",
removeEspIdfSettings
)
);
registerIDFCommand("espIdf.removeEspIdfSettings", asyncRemoveEspIdfSettings);
}

function checkAndNotifyMissingCompileCommands() {
Expand Down
2 changes: 1 addition & 1 deletion src/uninstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as vscode from "vscode";
import { Logger } from "./logger/logger";
import { OutputChannel } from "./logger/outputChannel";

export async function removeEspIdfSettings() {
export async function asyncRemoveEspIdfSettings() {
const config = vscode.workspace.getConfiguration();
const settingsToDelete: string[] = [];

Expand Down

0 comments on commit 87753b6

Please sign in to comment.