diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh index e2ccdb516..5e1e136e7 100755 --- a/test/lint/lint-shell.sh +++ b/test/lint/lint-shell.sh @@ -6,9 +6,15 @@ # # Check for shellcheck warnings in shell scripts. -# This script is intentionally locale dependent by not setting "export LC_ALL=C" -# to allow running certain versions of shellcheck that core dump when LC_ALL=C -# is set. +export LC_ALL=C + +# The shellcheck binary segfault/coredumps in Travis with LC_ALL=C +# It does not do so in Ubuntu 14.04, 16.04, 18.04 in versions 0.3.3, 0.3.7, 0.4.6 +# respectively. So export LC_ALL=C is set as required by lint-shell-locale.sh +# but unset here in case of running in Travis. +if [ "$TRAVIS" = "true" ]; then + unset LC_ALL +fi # Disabled warnings: # SC2001: See if you can use ${variable//search/replace} instead.