Skip to content

Commit

Permalink
cli: Interpret rich text when handling fatal error
Browse files Browse the repository at this point in the history
We may end up here upon a failure in `shell.run()`, and the error
message may contain rich text (such as "[[error]]").
  • Loading branch information
dbaty committed May 4, 2022
1 parent 9427e68 commit 01a4b80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cogite/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from . import config
from . import context
from . import errors
from . import interaction
from . import plugins
from . import version

Expand Down Expand Up @@ -159,7 +160,7 @@ def main():
try:
_main()
except errors.FatalError as error:
sys.exit(str(error))
sys.exit(interaction.interpret_rich_text(str(error)))


if __name__ == '__main__':
Expand Down

0 comments on commit 01a4b80

Please sign in to comment.