mirror of https://github.com/zulip/zulip.git
vagrant: Skip the shell virtualenv warning on provision.
This commit is contained in:
parent
237e3cdca1
commit
8d00111a27
|
@ -100,6 +100,11 @@ $provision_script = <<SCRIPT
|
|||
set -x
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Code should go here, rather than tools/provision, only if it is
|
||||
# something that we don't want to happen when running provision in a
|
||||
# development environment not using Vagrant.
|
||||
|
||||
# If the host is running SELinux remount the /sys/fs/selinux directory as read only,
|
||||
# needed for apt-get to work.
|
||||
if [ -d "/sys/fs/selinux" ]; then
|
||||
|
@ -111,6 +116,10 @@ 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
|
||||
|
||||
# Set an environment variable, so that we won't print the virtualenv
|
||||
# shell warning (it'll be wrong, since the shell is dying anyway)
|
||||
export SKIP_VENV_SHELL_WARNING=1
|
||||
|
||||
# Provision the development environment
|
||||
ln -nsf /srv/zulip ~/zulip
|
||||
/srv/zulip/tools/provision
|
||||
|
|
|
@ -35,7 +35,7 @@ if [ $failed = 1 ]; then
|
|||
echo "* Logs are here: zulip/var/log/provision.log"
|
||||
echo -e "\033[0m"
|
||||
exit 1
|
||||
elif [ "$VIRTUAL_ENV" != "/srv/zulip-py3-venv" ] && [ -z "$TRAVIS" ]; then
|
||||
elif [ "$VIRTUAL_ENV" != "/srv/zulip-py3-venv" ] && [ -z "${TRAVIS}${SKIP_VENV_SHELL_WARNING}" ]; then
|
||||
echo -e "\033[0;31m"
|
||||
echo "WARNING: This shell does not have the Python 3 virtualenv activated."
|
||||
echo "Zulip commands will fail."
|
||||
|
|
Loading…
Reference in New Issue