Skip to content

Commit 2583641

Browse files
committed
fix: don't warn when uninstalling
1 parent b3d9e19 commit 2583641

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/addon_manager/models/addon.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class Addon {
169169
localLogger.info(`Enabled "${this.name}"`);
170170
}
171171

172-
public async disable(folder: vscode.WorkspaceFolder) {
172+
public async disable(folder: vscode.WorkspaceFolder, silent = false) {
173173
const librarySetting = (await getSetting(
174174
LIBRARY_SETTING,
175175
folder
@@ -182,7 +182,7 @@ export class Addon {
182182
const index = librarySetting.findIndex((path) => regex.test(path));
183183

184184
if (index === -1) {
185-
localLogger.warn(`"${this.name}" is already disabled`);
185+
if (!silent) localLogger.warn(`"${this.name}" is already disabled`);
186186
this.#enabled[folder.index] = false;
187187
return;
188188
}
@@ -207,7 +207,7 @@ export class Addon {
207207

208208
public async uninstall() {
209209
for (const folder of vscode.workspace.workspaceFolders) {
210-
await this.disable(folder);
210+
await this.disable(folder, true);
211211
}
212212
const moduleURI = vscode.Uri.joinPath(this.uri, "module");
213213
await filesystem.deleteFile(moduleURI, {

0 commit comments

Comments
 (0)