Fixed problem matcher single string not handled

This commit is contained in:
Dirk Baeumer
2017-06-23 16:59:54 +02:00
parent 5d1fbab736
commit 333d658102

View File

@@ -1168,11 +1168,17 @@ export class Task implements vscode.Task {
constructor(kind: vscode.TaskKind, name: string, execution: ProcessExecution | ShellExecution);
constructor(kind: vscode.TaskKind, name: string, execution: ProcessExecution | ShellExecution, problemMatchers?: string | string[]);
constructor(kind: vscode.TaskKind, name: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string[]) {
constructor(kind: vscode.TaskKind, name: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]) {
this.kind = kind;
this.name = name;
this.execution = execution;
this._problemMatchers = problemMatchers || [];
if (typeof problemMatchers === 'string') {
this._problemMatchers = [problemMatchers];
} else if (Array.isArray(problemMatchers)) {
this._problemMatchers = problemMatchers;
} else {
this._problemMatchers = [];
}
this._isBackground = false;
}