Skip to content

Commit

Permalink
sync status code 1 on warnings/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adal-chiriliuc-reef committed May 3, 2024
1 parent 160e9d1 commit 6047ba2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions b2/_internal/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3089,6 +3089,8 @@ def _run(self, args):
raise CommandError(f'{ex.path} is not a directory')
except UnableToCreateDirectory as ex:
raise CommandError(f'unable to create directory {ex.path}')
if reporter.has_warnings_or_errors():
return 1
return 0

def get_policies_manager_from_args(self, args):
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+sync-status-code.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed `sync` command exit status code from 0 to 1 if any warnings or errors were encountered during the operation.

0 comments on commit 6047ba2

Please sign in to comment.