fix default "web" action not being set correctly

This commit is contained in:
Gered 2016-06-29 09:48:16 -04:00
parent aca45d9631
commit c1fcaa4837

View file

@ -47,10 +47,10 @@
(defn parse-cli-args (defn parse-cli-args
[args] [args]
(let [{:keys [options arguments errors summary] :as parsed-cli} (cli/parse-opts args cli-options) (let [{:keys [options arguments errors summary] :as parsed-cli} (cli/parse-opts args cli-options)
arguments (or arguments ["web"]) arguments (or (seq arguments) ["web"])
action (first arguments) action (first arguments)
arguments (rest arguments) arguments (rest arguments)
valid-action? (some #{action} (map first actions))] valid-action? (boolean (some #{action} (map first actions)))]
(cond (cond
(:help options) (exit 0 (->usage-string summary)) (:help options) (exit 0 (->usage-string summary))
(not valid-action?) (exit 1 (->usage-string summary)) (not valid-action?) (exit 1 (->usage-string summary))