Skip to content

Commit

Permalink
Fix persister not awaiting its value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jym77 committed Sep 4, 2024
1 parent 67a9827 commit 7363b35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export function persist<I, T extends Hashable, Q extends Question.Metadata, S>(
const dir = path.dirname(file);

fs.mkdirSync(dir, { recursive: true });
fs.writeFileSync(file, format(input, rules, [...outcomes]) + "\n");
fs.writeFileSync(
file,
(await format(input, rules, [...outcomes])) + "\n"
);

return `${message}, see the full report at ${file}`;
});
Expand Down

0 comments on commit 7363b35

Please sign in to comment.