提交 e1373b36 编写于 作者: M Matt Bierner

Use test instead of exec

上级 b53a2f4b
......@@ -75,7 +75,7 @@ export default class TscTaskProvider implements vscode.TaskProvider {
public async resolveTask(task: vscode.Task): Promise<vscode.Task | undefined> {
const definition = <TypeScriptTaskDefinition>task.definition;
const badTsconfig = /\\tsconfig.*\.json/;
if (badTsconfig.exec(definition.tsconfig) !== null) {
if (badTsconfig.test(definition.tsconfig)) {
// Warn that the task has the wrong slash type
vscode.window.showWarningMessage(localize('badTsConfig', "TypeScript Task in tasks.json contains \"\\\\\". TypeScript tasks tsconfig must use \"/\""));
return undefined;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册