Skip to content

Commit

Permalink
(refactor): use outputFile instead of mkdirs + writeFile (#617)
Browse files Browse the repository at this point in the history
- it does the same thing as those two combined
  • Loading branch information
agilgur5 authored Mar 17, 2020
1 parent d4dd010 commit b21d7af
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,7 @@ prog
}
console.log(cli.getFormatter()(report.results));
if (opts['report-file']) {
await fs.mkdirs(path.dirname(opts['report-file']));

await fs.writeFile(
await fs.outputFile(
opts['report-file'],
cli.getFormatter('json')(report.results)
);
Expand Down

0 comments on commit b21d7af

Please sign in to comment.