From 88d6c93955d8c422db3405eb226bb9f40c95ba6a Mon Sep 17 00:00:00 2001
From: Robin Richtsfeld <robin.richtsfeld@gmail.com>
Date: Fri, 15 Dec 2017 15:19:03 +0100
Subject: [PATCH] Fix some Bash issues (#491)

---
 test/shunit2      | 6 +++---
 test/utils        | 2 +-
 vendor/shunit2    | 6 +++---
 vendor/test-utils | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/shunit2 b/test/shunit2
index 8862ffd4..4d0940b3 100755
--- a/test/shunit2
+++ b/test/shunit2
@@ -25,9 +25,9 @@ SHUNIT_ERROR=2
 # enable strict mode by default
 SHUNIT_STRICT=${SHUNIT_STRICT:-${SHUNIT_TRUE}}
 
-_shunit_warn() { echo "shunit2:WARN $@" >&2; }
-_shunit_error() { echo "shunit2:ERROR $@" >&2; }
-_shunit_fatal() { echo "shunit2:FATAL $@" >&2; exit ${SHUNIT_ERROR}; }
+_shunit_warn() { echo "shunit2:WARN $*" >&2; }
+_shunit_error() { echo "shunit2:ERROR $*" >&2; }
+_shunit_fatal() { echo "shunit2:FATAL $*" >&2; exit ${SHUNIT_ERROR}; }
 
 # specific shell checks
 if [ -n "${ZSH_VERSION:-}" ]; then
diff --git a/test/utils b/test/utils
index 2332c708..1e079d29 100644
--- a/test/utils
+++ b/test/utils
@@ -36,7 +36,7 @@ capture()
 
   LAST_COMMAND="$@"
 
-  $@ >${STD_OUT} 2>${STD_ERR}
+  "$@" >${STD_OUT} 2>${STD_ERR}
   RETURN=$?
   rtrn=${RETURN} # deprecated
 }
diff --git a/vendor/shunit2 b/vendor/shunit2
index 9ec6c88b..efa373d7 100755
--- a/vendor/shunit2
+++ b/vendor/shunit2
@@ -25,9 +25,9 @@ SHUNIT_ERROR=2
 # enable strict mode by default
 SHUNIT_STRICT=${SHUNIT_STRICT:-${SHUNIT_TRUE}}
 
-_shunit_warn() { echo "shunit2:WARN $@" >&2; }
-_shunit_error() { echo "shunit2:ERROR $@" >&2; }
-_shunit_fatal() { echo "shunit2:FATAL $@" >&2; exit ${SHUNIT_ERROR}; }
+_shunit_warn() { echo "shunit2:WARN $*" >&2; }
+_shunit_error() { echo "shunit2:ERROR $*" >&2; }
+_shunit_fatal() { echo "shunit2:FATAL $*" >&2; exit ${SHUNIT_ERROR}; }
 
 # specific shell checks
 if [ -n "${ZSH_VERSION:-}" ]; then
diff --git a/vendor/test-utils b/vendor/test-utils
index 44d04def..57297070 100644
--- a/vendor/test-utils
+++ b/vendor/test-utils
@@ -36,7 +36,7 @@ capture()
 
   LAST_COMMAND="$@"
 
-  $@ >${STD_OUT} 2>${STD_ERR}
+  "$@" >${STD_OUT} 2>${STD_ERR}
   RETURN=$?
   rtrn=${RETURN} # deprecated
 }
-- 
GitLab