Exit cli with -1 on failure

This commit is contained in:
Micah Lee 2021-11-29 16:22:22 -08:00
parent 32792fc143
commit 7e74371edd
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -1,4 +1,5 @@
import os
import sys
import json
import click
from colorama import Fore, Style
@ -108,5 +109,7 @@ def cli_main(output_filename, ocr_lang, filename):
):
print_header("Safe PDF created successfully")
click.echo(common.output_filename)
sys.exit(0)
else:
print_header("Failed to convert document")
sys.exit(-1)