From a2031d91e53468d9ef465f3112bd188bb73c7135 Mon Sep 17 00:00:00 2001 From: Kristjan Eimre Date: Wed, 8 Nov 2023 15:14:07 +0100 Subject: [PATCH] cli: return 1 if failure --- disk_objectstore/cli.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/disk_objectstore/cli.py b/disk_objectstore/cli.py index b58652d..57532f5 100644 --- a/disk_objectstore/cli.py +++ b/disk_objectstore/cli.py @@ -236,7 +236,7 @@ def backup( backup_utils.logger.setLevel(logging.DEBUG) else: click.echo("Unsupported verbosity.") - return + return 1 try: backup_utils_instance = backup_utils.BackupUtilities( @@ -244,12 +244,12 @@ def backup( ) except ValueError as e: click.echo(f"Error: {e}") - return + return 1 success = backup_utils_instance.validate_inputs() if not success: click.echo("Input validation failed.") - return + return 1 with dostore.container as container: success = backup_utils_instance.backup_auto_folders( @@ -259,4 +259,5 @@ def backup( ) if not success: click.echo("Error: backup failed.") - return + return 1 + return 0