Fix broken result.json code (#3816)

* Fix broken result.json code

* lint
This commit is contained in:
Peter Hedenskog 2023-04-20 22:31:56 +02:00 committed by GitHub
parent 79f24afa03
commit 793dd6869e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -21,12 +21,10 @@ async function start() {
try {
const result = await run(options);
if (options.storeResult) {
if (options.storeResult == 'true') {
writeFileSync('result.json', JSON.stringify(result));
} else {
writeFileSync(options.storeResult, JSON.stringify(result));
}
// This can be used as an option to get hold of where the data is stored
// for third parties
if (options.storeResult == 'true') {
writeFileSync('result.json', JSON.stringify(result));
}
if (result.errors.length > 0) {