From 81806364f7e2a26eeec4cd8d2dc8b8cee06d1c66 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 30 Jul 2020 09:11:25 +0200 Subject: [PATCH] Fix typo in supressBuildAssetsNotification setting name --- src/assets.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/assets.ts b/src/assets.ts index 85d2efab6..410a05b34 100644 --- a/src/assets.ts +++ b/src/assets.ts @@ -517,8 +517,7 @@ async function promptToAddAssets(workspaceFolder: vscode.WorkspaceFolder) { const projectName = path.basename(workspaceFolder.uri.fsPath); - let csharpConfig = vscode.workspace.getConfiguration('csharp'); - if (!csharpConfig.get('supressBuildAssetsNotification')) { + if (!getBuildAssetsNotificationSetting()) { vscode.window.showWarningMessage( `Required assets to build and debug are missing from '${projectName}'. Add them?`, disableItem, noItem, yesItem) .then(selection => resolve(selection?.result ?? PromptResult.No)); @@ -526,6 +525,16 @@ async function promptToAddAssets(workspaceFolder: vscode.WorkspaceFolder) { }); } +function getBuildAssetsNotificationSetting() { + const newSettingName: string = 'suppressBuildAssetsNotification'; + let csharpConfig = vscode.workspace.getConfiguration('csharp'); + if (csharpConfig.has(newSettingName)) { + return csharpConfig.get(newSettingName); + } + + return csharpConfig.get('supressBuildAssetsNotification'); +} + export async function addTasksJsonIfNecessary(generator: AssetGenerator, operations: AssetOperations) { return new Promise((resolve, reject) => { if (!operations.addTasksJson && !operations.updateTasksJson) {