diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-04-04 12:25:12 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-04-04 12:25:12 -0300 |
commit | 4f6b37431e9fc86d03e2805e6ded3ee18f35f13b (patch) | |
tree | 6574d4d919dd031f4d2f191463a9180d04633e1f | |
parent | b2cce712c726fb32255010d59715616d6bc594d8 (diff) | |
download | hydra-4f6b37431e9fc86d03e2805e6ded3ee18f35f13b.tar.gz hydra-4f6b37431e9fc86d03e2805e6ded3ee18f35f13b.tar.bz2 |
Print usage if no hydra is specified
-rw-r--r-- | lib/hydra/misc | 5 |
1 files changed, 4 insertions, 1 deletions
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 |