Skip to content

Commit

Permalink
Stringify objects before writing file
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Sep 15, 2024
1 parent 445dcc8 commit 30916f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async function writeFile(
console.log(`Target parser ${targetParser.title} does not support the following properties:`);
console.log(writeUnsupportedProperties);
}
output = writeOutput;
output = typeof writeOutput === 'object' ? JSON.stringify(writeOutput, undefined, 2) : writeOutput;
} else {
output = JSON.stringify(readOutput, undefined, 2);
}
Expand Down

0 comments on commit 30916f8

Please sign in to comment.