Skip to content

Commit

Permalink
Fixed an issue with shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kpachhai committed May 6, 2024
1 parent 2d6c081 commit 175d6be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/tests.unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ if ! [[ "$0" =~ scripts/tests.unit.sh ]]; then
exit 255
fi

packages=($(go list ./... | grep -v tests))
go test -race -timeout="10m" -coverprofile="coverage.out" -covermode="atomic" "${packages[@]}"
# Use mapfile to read the output into an array
mapfile -t packages < <(go list ./... | grep -v tests)
# Now use the array with the 'go test' command
go test -race -timeout="10m" -coverprofile="coverage.out" -covermode="atomic" "${packages[@]}"

0 comments on commit 175d6be

Please sign in to comment.