diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresql index 72653b8e7d..9f9cda2978 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")/../.."