Skip to content

Commit 14b74ba

Browse files
committed
Allow using a var that points to a map as a command specification
1 parent 2e00cd8 commit 14b74ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
## Added
44

5-
## Fixed
6-
7-
## Changed
5+
- Allow using a var that points to a map as a command specification
86

97
# 0.17.71 (2024-07-24 / ac0239c)
108

src/lambdaisland/cli.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@
204204
(defn to-cmdspec [?var]
205205
(cond
206206
(var? ?var)
207-
(assoc (meta ?var) :command ?var)
207+
(if (fn? @?var)
208+
(assoc (meta ?var) :command ?var)
209+
(merge (meta ?var) @?var))
208210

209211
(fn? ?var)
210212
{:command ?var}

0 commit comments

Comments
 (0)