From d0565f794f45664c6fd42c584480fa3942b765ac Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Sat, 20 Sep 2025 01:12:59 +1000 Subject: [PATCH] Handle missing --csv/--demo option with cond-> --- src/core.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.clj b/src/core.clj index 897d272..7742cb7 100644 --- a/src/core.clj +++ b/src/core.clj @@ -74,9 +74,9 @@ "Run the CLI interface." [& args] (let [{:keys [options errors summary]} (parse-opts args cli-options) - errors (if-not (or (contains? options :csv) (contains? options :demo)) - (conj errors "Please provide a CSV file with \"--csv FILE\" or try \"--demo\"") - errors)] + no-csv-or-demo? (not (or (contains? options :csv) (contains? options :demo))) + errors (cond-> errors + no-csv-or-demo? (conj "Please provide a CSV file with \"--csv FILE\" or try \"--demo\""))] (when (:help options) (println summary) (System/exit 0))