From e2970ff5e0ceb051a5b2e647f29bf31b3925b402 Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Sat, 29 Nov 2025 11:42:19 +0100 Subject: [PATCH] Make error messages in the submit client stand out more prominently. --- submit/submit | 2 +- submit/submit_online.bats | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/submit/submit b/submit/submit index 446d9c38d3..2db01ae0c5 100755 --- a/submit/submit +++ b/submit/submit @@ -60,7 +60,7 @@ def warn_user(msg: str) -> None: def usage(msg: str) -> NoReturn: - logging.error(f'error: {msg}') + logging.error(f'\n\033[1;31mERROR: {msg}\033[0m\n') print(f"Type '{sys.argv[0]} --help' to get help.") exit(1) diff --git a/submit/submit_online.bats b/submit/submit_online.bats index 26b3179109..bf9a03de74 100755 --- a/submit/submit_online.bats +++ b/submit/submit_online.bats @@ -13,11 +13,11 @@ setup() { @test "contest via parameter overrides environment" { run ./submit -c bestaatniet assert_failure 1 - assert_partial "error: No (valid) contest specified" + assert_partial "ERROR: No (valid) contest specified" run ./submit --contest=bestaatookniet assert_failure 1 - assert_partial "error: No (valid) contest specified" + assert_partial "ERROR: No (valid) contest specified" } @test "hello problem id and name are in help output" { @@ -78,14 +78,14 @@ setup() { cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/A.java run ./submit -p nonexistent -l cpp $BATS_TMPDIR/A.java <<< "n" assert_failure 1 - assert_partial "error: No known problem specified or detected" + assert_partial "ERROR: No known problem specified or detected" } @test "non existing language name emits error" { cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/hello.java run ./submit -p C -l nonexistent $BATS_TMPDIR/hello.java <<< "n" assert_failure 1 - assert_partial "error: No known language specified or detected" + assert_partial "ERROR: No known language specified or detected" } @test "detect entry point Java" {