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 20:28:26 -0400
commitb093074eaa83949269f048713121a3a0e98d4137 (patch)
treef3d9d02f8df75eb0c64fa4b7fd54cb8ec6a0e1ac
parent214b2b6916f2d016ab9db0b766060e7828bb47a0 (diff)
downloadhaskell-b093074eaa83949269f048713121a3a0e98d4137.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) (cherry picked from commit c10ff55fddf8c6708d679e91f3253dc642b91565)
-rwxr-xr-x.gitlab/ci.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index e27b7ac31e..5a42709c24 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