Skip to content

Commit

Permalink
Use click.Abort() in _terminate
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Mar 5, 2024
1 parent 9b646df commit da15c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openhexa/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def workspaces_add(slug, token):
settings.add_workspace(slug, token)
except APIError as e:
_terminate(
f"Workspace {slug} does not exist on {settings.api_url}. Available workspaces:\n {', '.join(settings.workspaces.keys())}",
f"Workspace {slug} does not exist on {settings.api_url}.",
exception=e,
err=True,
)
Expand Down Expand Up @@ -410,4 +410,4 @@ def _terminate(message: str, exception: Exception = None, err: bool = False):
click.echo(message, err=err)
if settings.debug and exception:
raise exception
sys.exit(1)
click.Abort()

0 comments on commit da15c05

Please sign in to comment.