Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade-postgresql: Force a known locale.

Alex Vandiver2bbeef301afa
diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresql
index 72653b8e7dd..9f9cda2978d 100755
--- a/scripts/setup/upgrade-postgresql
+++ b/scripts/setup/upgrade-postgresql
@@ -6,6 +6,12 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi
+# Force a known locale; some OS X terminals set an invalid LC_CTYPE
+# which crashes pg_upgradecluster
+export LC_ALL=C.UTF-8
+export LANG=C.UTF-8
+export LANGUAGE=C.UTF-8
+
UPGRADE_TO=${1:-14}
UPGRADE_FROM=$(crudini --get /etc/zulip/zulip.conf postgresql version)
ZULIP_PATH="$(dirname "$0")/../.."