Handle missing --csv/--demo option with cond->
This commit is contained in:
parent
7c3b1b9864
commit
d0565f794f
1 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue