Skip to content

Commit c4be7b8

Browse files
committed
Reuse installed ginkgo and use cleaner binary check
1 parent 17c4f71 commit c4be7b8

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

scripts/subtests/lint

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ set -o pipefail
55

66
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
77

8-
set +e
9-
golangci_lint_executable=$(which golangci-lint)
10-
set -e
11-
if [ -z "${golangci_lint_executable}" ] || [ ! -x "${golangci_lint_executable}" ]; then
8+
if ! command -v golangci-lint &> /dev/null; then
129
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
1310
fi
1411

scripts/subtests/unit-test

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ if [ "${CI:-false}" = 'false' ]; then
1111
fi
1212

1313
pushd "${SCRIPT_DIR}/../../src" > /dev/null
14-
go run github.com/onsi/ginkgo/v2/ginkgo $flags
15-
popd > /dev/null
16-
14+
if ! command -v ginkgo &> /dev/null; then
15+
go install github.com/onsi/ginkgo/v2/ginkgo@latest
16+
fi
17+
ginkgo $flags
18+
popd > /dev/null

0 commit comments

Comments
 (0)