Skip to content

Commit 8287a25

Browse files
committed
Make error messages in the submit client stand out more prominently.
1 parent 10b8c2c commit 8287a25

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

submit/submit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def warn_user(msg: str) -> None:
6060

6161

6262
def usage(msg: str) -> NoReturn:
63-
logging.error(f'error: {msg}')
63+
logging.error(f'\n\033[1;31mERROR: {msg}\033[0m\n')
6464
print(f"Type '{sys.argv[0]} --help' to get help.")
6565
exit(1)
6666

submit/submit_online.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ setup() {
1313
@test "contest via parameter overrides environment" {
1414
run ./submit -c bestaatniet
1515
assert_failure 1
16-
assert_partial "error: No (valid) contest specified"
16+
assert_partial "ERROR: No (valid) contest specified"
1717

1818
run ./submit --contest=bestaatookniet
1919
assert_failure 1
20-
assert_partial "error: No (valid) contest specified"
20+
assert_partial "ERROR: No (valid) contest specified"
2121
}
2222

2323
@test "hello problem id and name are in help output" {
@@ -78,14 +78,14 @@ setup() {
7878
cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/A.java
7979
run ./submit -p nonexistent -l cpp $BATS_TMPDIR/A.java <<< "n"
8080
assert_failure 1
81-
assert_partial "error: No known problem specified or detected"
81+
assert_partial "ERROR: No known problem specified or detected"
8282
}
8383

8484
@test "non existing language name emits error" {
8585
cp ../example_problems/hello/submissions/accepted/test-hello.java $BATS_TMPDIR/hello.java
8686
run ./submit -p C -l nonexistent $BATS_TMPDIR/hello.java <<< "n"
8787
assert_failure 1
88-
assert_partial "error: No known language specified or detected"
88+
assert_partial "ERROR: No known language specified or detected"
8989
}
9090

9191
@test "detect entry point Java" {

0 commit comments

Comments
 (0)