From: Silvio Rhatto Date: Mon, 28 Mar 2016 15:28:13 +0000 (-0300) Subject: Check if hydra is configured X-Git-Tag: 0.2.4~190 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=84049560f09647b70ff6d860de2956d73fd3480e;p=hydra.git Check if hydra is configured --- diff --git a/lib/hydra/misc b/lib/hydra/misc index d8dfb3b..8071c32 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -15,6 +15,13 @@ function hydra_set_env { export HYDRA_FOLDER="`hydra_eval_parameter $HYDRA`" export PREFERENCES="$HOME/.hydra/$HYDRA" fi + + if [ "$ACTION" != "register" ] && [ "$ACTION" != "init" ]; then + if [ -z "$HYDRA_FOLDER" ] || [ ! -d "$HYDRA_FOLDER" ]; then + echo "hydra $HYDRA not configured, aborting" + exit 1 + fi + fi } # Read a parameter from user