From: Silvio Rhatto Date: Tue, 4 Apr 2017 15:25:12 +0000 (-0300) Subject: Print usage if no hydra is specified X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4f6b37431e9fc86d03e2805e6ded3ee18f35f13b;p=hydra.git Print usage if no hydra is specified --- diff --git a/lib/hydra/misc b/lib/hydra/misc index f086fb7..492a2bb 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -17,7 +17,10 @@ function hydra_set_env { fi if [ "$NAME" == "hydra" ]; then - if [ "$ACTION" != "register" ] && [ "$ACTION" != "init" ]; then + if [ -z "$HYDRA" ]; then + hydra_action_usage + exit 1 + elif [ "$ACTION" != "register" ] && [ "$ACTION" != "init" ]; then if [ -z "$HYDRA_FOLDER" ] || [ ! -d "$HYDRA_FOLDER" ]; then echo "hydra $HYDRA not configured, aborting" exit 1