From 8f7640dbefd1adbd7e4104a404fa018f851776b5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 18 Nov 2021 13:00:39 +0100 Subject: ci: run style unit tests only if we target develop (#27472) Some tests assume the base branch is develop, but this branch may not have been checked out. --- share/spack/qa/run-style-tests | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'share') diff --git a/share/spack/qa/run-style-tests b/share/spack/qa/run-style-tests index 72c47ff055..9f0cbdb266 100755 --- a/share/spack/qa/run-style-tests +++ b/share/spack/qa/run-style-tests @@ -14,15 +14,15 @@ # Usage: # run-flake8-tests # -. "$(dirname $0)/setup.sh" +. "$(dirname "$0")/setup.sh" -BASE="" -if [ -n "$GITHUB_BASE_REF" ]; then - BASE="--base ${GITHUB_BASE_REF}" +args=() +if [[ -n $GITHUB_BASE_REF ]]; then + args+=("--base" "${GITHUB_BASE_REF}") fi # verify that the code style is correct -spack style --root-relative $BASE +spack style --root-relative "${args[@]}" # verify that the license headers are present spack license verify -- cgit v1.2.3-70-g09d2