Skip to content

Commit a108a8a

Browse files
committed
chore(scripts): trim whitespace from check output
Signed-off-by: Dorin Geman <[email protected]>
1 parent 9e352fa commit a108a8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/sync-go-version.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ check_file() {
6868

6969
if ! grep -q "$expected_pattern" "$file"; then
7070
local current
71-
current=$(grep "$search_pattern" "$file" 2>/dev/null | head -1 || echo "(not found)")
71+
current=$(grep "$search_pattern" "$file" 2>/dev/null | head -1 | xargs)
72+
current=${current:-(not found)}
7273
echo "Mismatch: $(realpath "$file")"
7374
echo " have: $current"
7475
echo " want: $expected_value"

0 commit comments

Comments
 (0)