aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Ward <kate.ward@forestent.com>2018-01-19 00:28:18 +0100
committerKate Ward <kate.ward@forestent.com>2018-01-19 00:28:18 +0100
commite38d04c0d755bcbca69a602d28bd36f54757e4a1 (patch)
tree69cdee38d186ee53fb9a2a97d80ece2b61338ba9
parent5704f9257937531f50be756063dbfe482135c077 (diff)
downloadshflags-e38d04c0d755bcbca69a602d28bd36f54757e4a1.tar.gz
Fixed ash misdetection.
-rwxr-xr-xtest_runner6
1 files changed, 4 insertions, 2 deletions
diff --git a/test_runner b/test_runner
index 1c43c4a..415cc8b 100755
--- a/test_runner
+++ b/test_runner
@@ -17,6 +17,8 @@
# shellcheck disable=SC1090,SC1091
# expr may be antiquated, but it is the only solution in some cases.
# shellcheck disable=SC2003
+# $() are not fully portable (POSIX != portable).
+# shellcheck disable=SC2006
# Return if test_runner already loaded.
[ -z "${RUNNER_LOADED:-}" ] || return 0
@@ -128,8 +130,8 @@ EOF
shell_present=${FALSE}
case ${shell} in
ash)
- shell_bin=`which busybox`
- [ $? -eq "${TRUE}" ] && shell_present="${TRUE}"
+ shell_bin=`which busybox |grep -v '^no busybox'`
+ [ $? -eq "${TRUE}" -a -n "${shell_bin}" ] && shell_present="${TRUE}"
shell_bin="${shell_bin} ash"
shell_name=${shell}
;;