Skip to content

Commit

Permalink
(refactor): use outputFile instead of mkdirs + writeFile (jaredpalmer…
Browse files Browse the repository at this point in the history
…#617)

- it does the same thing as those two combined
  • Loading branch information
agilgur5 authored and paul-vd committed Dec 1, 2020
1 parent 54a1d36 commit 894d9b3
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 @@ -648,9 +648,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 894d9b3

Please sign in to comment.