json: Fix crash when --output is specified

This commit is contained in:
Starbeamrainbowlabs 2022-12-06 18:01:00 +00:00
parent 1d8b1b4016
commit 1cba6dc8cd
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ npm install --save terrain50-cli
## v1.11 (unreleased)
- `json`: Support `--tolerant`
- `json`: Fix crash when `--output` is specified
## v1.10 (6th December 2022)

View File

@ -22,7 +22,7 @@ async function process_filename(filepath, stream_out) {
}
export default async function(settings) {
const stream_out = process.stdout;
let stream_out = process.stdout;
if(settings.cli.output !== "-")
stream_out = fs.createWriteStream(settings.cli.output);