Skip to content

Commit d495585

Browse files
committed
Fix output parsing. Refs #35
1 parent 53c9b7f commit d495585

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/cli/EFOutputParser.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export class EFOutputParser {
4848
}
4949

5050
public static parse(output: string) {
51-
let warnings = '';
52-
let data = '';
53-
let errors = '';
51+
let warnings: string[] = [];
52+
let data: string[] = [];
53+
let errors: string[] = [];
5454
let matchedWarning = false;
5555
let matchedError = false;
5656

@@ -72,18 +72,18 @@ export class EFOutputParser {
7272
const lineWithoutPrefix = line.replace(OUTPUT_PREFIX, '');
7373

7474
if (matchedWarning) {
75-
warnings += lineWithoutPrefix;
75+
warnings.push(lineWithoutPrefix);
7676
} else if (matchedError) {
77-
errors += lineWithoutPrefix;
77+
errors.push(lineWithoutPrefix);
7878
} else if (matchedData) {
79-
data += lineWithoutPrefix;
79+
data.push(lineWithoutPrefix);
8080
}
8181
});
8282

8383
return {
84-
warnings,
85-
errors,
86-
data,
84+
warnings: warnings.join('\n'),
85+
errors: errors.join('\n'),
86+
data: data.join('\n'),
8787
};
8888
}
8989
}

0 commit comments

Comments
 (0)