Skip to content

Commit 0289abd

Browse files
committed
add review improvements
1 parent 32a70ec commit 0289abd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/dashboard/format_results.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
set -euo pipefail
66

77
# Check if required arguments are provided
8-
if [ $# -lt 3 ]; then
8+
if [ "$#" -ne 3 ]; then
99
echo "Usage: $0 <job_result> <test_type> <workspace>"
1010
exit 1
1111
fi
@@ -21,12 +21,12 @@ OUTPUT_DIR="$WORKSPACE/test/dashboard/logs/$TEST_TYPE"
2121

2222
# Validate input file exists
2323
if [ ! -f "$INPUT_FILE" ]; then
24-
echo "Error: Input file $INPUT_FILE does not exist."
24+
echo "Error: Input file not found: $INPUT_FILE"
2525
exit 1
2626
fi
2727

2828
format_log() {
29-
local line="$1"
29+
line="$1"
3030
json="{"
3131

3232
while [[ "$line" =~ ([a-zA-Z0-9_]+)=((\"([^\"\\]|\\.)*\")|[^[:space:]]+) ]]; do

0 commit comments

Comments
 (0)