]> gitweb.fluxo.info Git - hydra.git/commitdiff
Print usage if no hydra is specified
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Apr 2017 15:25:12 +0000 (12:25 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Apr 2017 15:25:12 +0000 (12:25 -0300)
lib/hydra/misc

index f086fb7107a2e94392fd4d8cce6262486fc453ac..492a2bba9aa12324289c7fa1574201bdcbdb7d7c 100644 (file)
@@ -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