From a05e3d996a0a8ab5f13ee4e72dbf4157d2c330b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Tar?= Date: Tue, 31 Oct 2017 14:27:24 +0100 Subject: [PATCH] Fix different error message in source and package.nls for npm package (#37096) * Fix package.nls.json for npm Error message was different in main.ts. * Fix language string key in npm/src/main.ts --- extensions/npm/package.nls.json | 4 ++-- extensions/npm/src/main.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/npm/package.nls.json b/extensions/npm/package.nls.json index 2349b8f7495..3b0b39700c8 100644 --- a/extensions/npm/package.nls.json +++ b/extensions/npm/package.nls.json @@ -1,5 +1,5 @@ { "config.npm.autoDetect": "Controls whether auto detection of npm scripts is on or off. Default is on.", "config.npm.runSilent": "Run npm commands with the `--silent` option", - "npm.parseError": "Npm task detection could not parse the {0}" -} \ No newline at end of file + "npm.parseError": "Npm task detection: failed to parse the file {0}" +} diff --git a/extensions/npm/src/main.ts b/extensions/npm/src/main.ts index 3bcfb6ebac7..e18287872db 100644 --- a/extensions/npm/src/main.ts +++ b/extensions/npm/src/main.ts @@ -143,7 +143,7 @@ async function provideNpmScriptsForFolder(folder: vscode.WorkspaceFolder): Promi // result.push(createTask('install', 'install', rootPath, folder, [])); return result; } catch (e) { - let localizedParseError = localize('npm.parseerror', 'Npm task detection: failed to parse the file {0}', packageJson); + let localizedParseError = localize('npm.parseError', 'Npm task detection: failed to parse the file {0}', packageJson); throw new Error(localizedParseError); } } @@ -168,4 +168,4 @@ function createTask(script: string, cmd: string, rootPath: string, folder: vscod }; let taskName = getTaskName(script); return new vscode.Task(kind, folder, taskName, 'npm', new vscode.ShellExecution(getCommandLine(folder, cmd), { cwd: rootPath }), matcher); -} \ No newline at end of file +}