From c1fcaa4837be5e47fa6eb3ea6b3f333655521b5e Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 29 Jun 2016 09:48:16 -0400 Subject: [PATCH] fix default "web" action not being set correctly --- src/mtgcoll/cli.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mtgcoll/cli.clj b/src/mtgcoll/cli.clj index 3b5a3c5..c4dd144 100644 --- a/src/mtgcoll/cli.clj +++ b/src/mtgcoll/cli.clj @@ -47,10 +47,10 @@ (defn parse-cli-args [args] (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) arguments (rest arguments) - valid-action? (some #{action} (map first actions))] + valid-action? (boolean (some #{action} (map first actions)))] (cond (:help options) (exit 0 (->usage-string summary)) (not valid-action?) (exit 1 (->usage-string summary))