From 9d078f8b6bea9d71d454e19714b14fe020e78d5c Mon Sep 17 00:00:00 2001 From: tourist <40332842+Ps7ch3@users.noreply.github.com> Date: Mon, 12 Dec 2022 01:53:45 +0800 Subject: [PATCH] feat: allow empty diff when 'renderNothingWhenEmpty' enabled When '--renderNothingWhenEmpty' enabled, don't fail even if content is empty. Closes: #141 --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 3bd34ce..338ba6c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,7 +11,7 @@ export async function main(): Promise { const input = await cli.getInput(configuration.inputSource, argv.extraArguments, configuration.ignore); - if (!input) { + if (!input && !diff2htmlOptions.renderNothingWhenEmpty) { process.exitCode = 3; log.error('The input is empty. Try again.'); yargs.help();