From 088f864e5f127676c97c07a3d2caf1608de7a71d Mon Sep 17 00:00:00 2001 From: plocket <52798256+plocket@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:06:10 -0400 Subject: [PATCH] Remove $ between (()) because of error msg below, add spacing Shell script error message in GitHub (fine locally): ((: i=: syntax error: operand expected (error token is "=") --- tests/log_codes/check_codes.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/log_codes/check_codes.sh b/tests/log_codes/check_codes.sh index f0210edd..33aa276e 100755 --- a/tests/log_codes/check_codes.sh +++ b/tests/log_codes/check_codes.sh @@ -66,7 +66,7 @@ max_num=$(printf "%s\n" "${num_array[@]}" | sort -n | tail -n 1) # # (seq doesn't exist everywhere. Keep this till we look up installing seq to avoid loop) # expected_sequence=$(printf "ALK%04d\n" $(seq $min_num $max_num)) expected_sequence="" -for ((i=$min_num; i<=$max_num; i++)); do +for ((i=min_num; i<=max_num; i++)); do # Make sure these won't look like numbers to avoid confusing bash expected_sequence+=$(printf "ALK%04d" $i)$'\n' done @@ -81,6 +81,7 @@ else fi +echo "" echo "=== Duplicate codes ===" # We know these duplicates are ok @@ -114,10 +115,12 @@ else fi # === Final messages === +echo "" echo "Exit code meanings: - code 2: missing codes - code 20: duplicate codes - code 22: both" +echo "" if test $exit_code -eq 0; then echo "🌈 Passed! The codes for logs are as they should be."