aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Fleischer <tirednesscankill@warhog.net>2018-08-02 14:32:51 +0200
committerJulian Fleischer <tirednesscankill@warhog.net>2018-08-02 14:46:05 +0200
commit83c48d9a1f15e1531ac7bec0c1440f69ace3ee37 (patch)
treec26ccd54bf1206a4fa30edefe53c7b94e1feb19b /test
parent990e182587999dba33f2a8172cc39d4a20d2e207 (diff)
downloadbitcoin-83c48d9a1f15e1531ac7bec0c1440f69ace3ee37.tar.xz
fix locale for lint-shell
Diffstat (limited to 'test')
-rwxr-xr-xtest/lint/lint-shell.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/lint/lint-shell.sh b/test/lint/lint-shell.sh
index e2ccdb5165..5e1e136e7d 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.