From b591d9b07dad258f83866d429602a10574f4fc90 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 22 Feb 2021 00:21:20 -0600 Subject: [PATCH] Fix lint script to run on macOS See - `-v` only supported in newer bash 4.2 or above: https://unix.stackexchange.com/a/212192/52320 - How to test for environemmnt variable existence, https://stackoverflow.com/a/13864829/796832 - No-op: https://unix.stackexchange.com/a/287867/52320 --- build/scripts/find-lint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/scripts/find-lint.sh b/build/scripts/find-lint.sh index 55f81ed9..a54b8bc2 100755 --- a/build/scripts/find-lint.sh +++ b/build/scripts/find-lint.sh @@ -19,7 +19,10 @@ if [ ${1:-""} = "fast" ] then args="--fast" fi -if [[ -v COMPLEMENT_LINT_CONCURRENCY ]]; then +if [ -z ${COMPLEMENT_LINT_CONCURRENCY+x} ]; then + # COMPLEMENT_LINT_CONCURRENCY was not set + : +else args="${args} --concurrency $COMPLEMENT_LINT_CONCURRENCY" fi