summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-07 12:12:46 -0400
committerBen Gamari <ben@smart-cactus.org>2020-09-07 12:25:42 -0400
commitc10ff55fddf8c6708d679e91f3253dc642b91565 (patch)
tree6b849f93b0b9fe2a3d25cc0bdb48e994756f028b
parent643785e3835de2de6c575e6418db0d4598b72a7d (diff)
downloadhaskell-c10ff55fddf8c6708d679e91f3253dc642b91565.tar.gz
gitlab-ci: Handle distributions without locales
Previously we would assume that the `locale` utility exists. However, this is not so on Alpine as musl's locale support is essentially non-existent. (cherry picked from commit 17cdb7ac3b557a245fee1686e066f9f770ddc21e)
-rwxr-xr-x.gitlab/ci.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index f031c5f03f..a35a104873 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -58,6 +58,12 @@ function run() {
TOP="$(pwd)"
function setup_locale() {
+ # Musl doesn't provide locale support at all...
+ if ! which locale > /dev/null; then
+ info "No locale executable. Skipping locale setup..."
+ return
+ fi
+
# BSD grep terminates early with -q, consequently locale -a will get a
# SIGPIPE and the pipeline will fail with pipefail.
shopt -o -u pipefail