Error message instead of putting an invalid name in Vagrantfile (#33)

* Error message instead of putting an invalid name in Vagrantfile
* Suggested command doesn't work (#32)
This commit is contained in:
ariasuni 2017-08-26 19:32:40 +02:00 committed by Alexandre Aubin
parent 4750098185
commit 0f9812d66d

View file

@ -109,6 +109,10 @@ elif [ "$1" = "create-env" ]; then
## Run a vm and give a prompt ## ## Run a vm and give a prompt ##
################################# #################################
elif [ "$1" = "run" ]; then elif [ "$1" = "run" ]; then
if [[ $2 == *"-"* ]]; then
echo "ERROR: Vagrant virtual machine ($2) cannot contain any dash"
exit 2
fi
DOMAIN=$2 DOMAIN=$2
VERSION='stable' VERSION='stable'
@ -252,7 +256,7 @@ elif [ "$1" = "use-git" ]; then
echo "Using Git repository for yunohost" echo "Using Git repository for yunohost"
# bin # bin
create_sym_link "/vagrant/yunohost/bin/yunohost" "/usr/bin/yunohost" create_sym_link "/vagrant/yunohost/bin/yunohost" "/usr/bin/yunohost"
create_sym_link "/vagrant/yunohost/bin/yunohost-api" "/usr/bin/yunohost-api" create_sym_link "/vagrant/yunohost/bin/yunohost-api" "/usr/bin/yunohost-api"
# data # data