From 28334b800c014a9e0b6e980b5365af6fdc1d8950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wieland=20Sch=C3=B6bl?= Date: Thu, 5 Aug 2021 15:40:00 +0200 Subject: [PATCH] fix: fix unwanted crash when not supplying an error path --- src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index d848e56d..91e08751 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -82,7 +82,7 @@ commander // tslint:disable-next-line:no-magic-numbers writeFileSync(errPath, JSON.stringify(result.errors, null, 2)); Logger.ok(`Mapping errors written to ${errPath}.`); - } else { + } else if (result.errors.length > 0) { for (const error of result.errors) { await Logger.error(error); }