Skip to content

Commit

Permalink
Change: Make errors more visible in the terminal
Browse files Browse the repository at this point in the history
Don't let errors look like normal terminal output. Instead highlight the
error.
  • Loading branch information
bjoernricks committed Jul 13, 2023
1 parent 27f0d93 commit a513666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion greenbone/feed/sync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def main() -> NoReturn:
try:
sys.exit(asyncio.run(feed_sync(console, error_console)))
except GreenboneFeedSyncError as e:
error_console.print(str(e))
error_console.print(f"[red]❌[/red]Error: {e}")
sys.exit(1)
except KeyboardInterrupt:
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def test_sync_nvts_error(
call(
f"Releasing lock on {temp_dir}/openvas/feed-update.lock"
),
call("An error"),
call("[red]❌[/red]Error: An error"),
]
)

Expand Down

0 comments on commit a513666

Please sign in to comment.