Skip to content

Commit

Permalink
Use templates for the error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Pinkney <[email protected]>
  • Loading branch information
JPinkney committed Dec 2, 2020
1 parent 2b90d76 commit 5e7cf50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/extensionConflicts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ export function showUninstallConflictsNotification(conflictingExts: Extension<an
// Gather all the conflicting display names
let conflictMsg = '';
if (conflictingExts.length === 1) {
conflictMsg =
conflictingExts[0].packageJSON.displayName + ' extension is incompatible with VSCode-YAML. Please uninstall it.';
conflictMsg = `${conflictingExts[0].packageJSON.displayName} extension is incompatible with VSCode-YAML. Please uninstall it.`;
} else {
const extNames = [];
conflictingExts.forEach((ext) => {
extNames.push(ext.packageJSON.displayName);
});
conflictMsg = 'The ' + extNames.join(', ') + ' extensions are incompatible with VSCode-YAML. Please uninstall them.';
conflictMsg = `The ${extNames.join(', ')} extensions are incompatible with VSCode-YAML. Please uninstall them.`;
}

window.showInformationMessage(conflictMsg, uninstallMsg).then((clickedMsg) => {
Expand Down

0 comments on commit 5e7cf50

Please sign in to comment.