mirror of https://github.com/zulip/zulip.git
provision: Refuse to run outside an existing Vagrant environment.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0485aece4e
commit
2c27a87bcd
|
@ -10,6 +10,13 @@ if [ "$EUID" -eq 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e "$(dirname "${BASH_SOURCE[0]}")/../.vagrant" ] && [ ! -e /home/vagrant ]; then
|
||||||
|
echo 'Error: provision should be run inside the Vagrant environment.' >&2
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
echo 'Try `vagrant up --provision`.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
os="$(. /etc/os-release && echo "$ID $VERSION_ID")"
|
os="$(. /etc/os-release && echo "$ID $VERSION_ID")"
|
||||||
case "$os" in
|
case "$os" in
|
||||||
'ubuntu 14.04' | 'ubuntu 16.04')
|
'ubuntu 14.04' | 'ubuntu 16.04')
|
||||||
|
|
Loading…
Reference in New Issue