Skip to content

Commit

Permalink
replace which in shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Jan 26, 2024
1 parent 1737a89 commit 0f65bfc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

# Check if gotestfmt is installed
GOTESTFMT=$(which gotestfmt)
if [[ -z "${GOTESTFMT}" ]]; then
if ! [ -x "$(command -v gotestfmt)" ]; then
echo "gotestfmt not found. Using test standard output."
fi

# if gotestfmt is installed, run with it
if [[ -n "${GOTESTFMT}" ]]; then
if [ -x "$(command -v gotestfmt)" ]; then
set -o pipefail
go test ./... ${GO_TEST_FLAGS} -json | gotestfmt ${GOTESTFMT_FLAGS}
else
Expand Down

0 comments on commit 0f65bfc

Please sign in to comment.