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
This commit is contained in:
Dániel Tar 2017-10-31 14:27:24 +01:00 committed by Erich Gamma
parent cabf4b2997
commit a05e3d996a
2 changed files with 4 additions and 4 deletions

View file

@ -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}"
}
"npm.parseError": "Npm task detection: failed to parse the file {0}"
}

View file

@ -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);
}
}