From 84049560f09647b70ff6d860de2956d73fd3480e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 28 Mar 2016 12:28:13 -0300 Subject: Check if hydra is configured --- lib/hydra/misc | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3