summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-07 12:12:46 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-08 15:43:54 -0400
commit0c61cbfff985723240671b54d6f80075e4907e85 (patch)
tree387beea680a2e6fa10dd497ec25446d8fba1cbda
parent44472daf500bf862921e89ad45c9741a07a64f61 (diff)
downloadhaskell-0c61cbfff985723240671b54d6f80075e4907e85.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 81086d2ce1..5714f03fd4 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