From 0f9812d66db8d6e0289e99399062d73bfa2c5659 Mon Sep 17 00:00:00 2001 From: ariasuni Date: Sat, 26 Aug 2017 19:32:40 +0200 Subject: [PATCH] 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) --- ynh-dev | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ynh-dev b/ynh-dev index 2e649be..a7f9d32 100755 --- a/ynh-dev +++ b/ynh-dev @@ -109,6 +109,10 @@ elif [ "$1" = "create-env" ]; then ## Run a vm and give a prompt ## ################################# elif [ "$1" = "run" ]; then + if [[ $2 == *"-"* ]]; then + echo "ERROR: Vagrant virtual machine ($2) cannot contain any dash" + exit 2 + fi DOMAIN=$2 VERSION='stable' @@ -252,7 +256,7 @@ elif [ "$1" = "use-git" ]; then echo "Using Git repository for yunohost" # 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" # data