summary refs log tree commit diff
path: root/scripts-dev/complement.sh
diff options
context:
space:
mode:
authorDan Callahan <danc@element.io>2021-10-22 22:46:06 +0100
committerDan Callahan <danc@element.io>2021-10-22 23:08:54 +0100
commit13f084eb58c379b2fc073680818d5931e94626f4 (patch)
treefb5d41ac9612ff43394d7d1d722d30e45aa4df1a /scripts-dev/complement.sh
parentFix Shellcheck SC2012: Use find instead of ls (diff)
downloadsynapse-13f084eb58c379b2fc073680818d5931e94626f4.tar.xz
Fix Shellcheck SC2086: Quote to prevent splitting
Double quote to prevent globbing and word splitting.

https://github.com/koalaman/shellcheck/wiki/SC2086

Signed-off-by: Dan Callahan <danc@element.io>
Diffstat (limited to 'scripts-dev/complement.sh')
-rwxr-xr-xscripts-dev/complement.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts-dev/complement.sh b/scripts-dev/complement.sh
index 89af7a4fde..7d38b39e90 100755
--- a/scripts-dev/complement.sh
+++ b/scripts-dev/complement.sh
@@ -24,7 +24,7 @@
 set -e
 
 # Change to the repository root
-cd "$(dirname $0)/.."
+cd "$(dirname "$0")/.."
 
 # Check for a user-specified Complement checkout
 if [[ -z "$COMPLEMENT_DIR" ]]; then
@@ -61,8 +61,8 @@ cd "$COMPLEMENT_DIR"
 EXTRA_COMPLEMENT_ARGS=""
 if [[ -n "$1" ]]; then
   # A test name regex has been set, supply it to Complement
-  EXTRA_COMPLEMENT_ARGS+="-run $1 "
+  EXTRA_COMPLEMENT_ARGS=(-run "$1")
 fi
 
 # Run the tests!
-go test -v -tags synapse_blacklist,msc2946,msc3083,msc2403,msc2716 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests/...
+go test -v -tags synapse_blacklist,msc2946,msc3083,msc2403,msc2716 -count=1 "${EXTRA_COMPLEMENT_ARGS[@]}" ./tests/...