From b4e98a695dc5785fc916d996f113badb748ac1bb Mon Sep 17 00:00:00 2001 From: inytar Date: Tue, 22 Nov 2016 13:43:01 -0500 Subject: [PATCH] Set the default locale to en_US.UTF-8 in vagrant. Prevents errors on vagrant ssh if the host system has an locale unknown to the vagrant system. --- Vagrantfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 21732e5cf0..def1d6aab7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -99,8 +99,17 @@ set -o pipefail if [ -d "/sys/fs/selinux" ]; then sudo mount -o remount,ro /sys/fs/selinux fi + +# Set default locale, this prevents errors if the user has another locale set. +if ! grep -q 'LC_ALL=en_US.UTF-8' /etc/default/locale; then + echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/default/locale +fi + +# Provision the development environment ln -nsf /srv/zulip ~/zulip /srv/zulip/tools/provision + +# Run any custom provision hooks the user has configured if [ -f /srv/zulip/tools/custom_provision ]; then chmod +x /srv/zulip/tools/custom_provision /srv/zulip/tools/custom_provision