Skip to content

Commit

Permalink
Allow using a var that points to a map as a command specification
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Aug 5, 2024
1 parent 2e00cd8 commit 14b74ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

## Added

## Fixed

## Changed
- Allow using a var that points to a map as a command specification

# 0.17.71 (2024-07-24 / ac0239c)

Expand Down
4 changes: 3 additions & 1 deletion src/lambdaisland/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@
(defn to-cmdspec [?var]
(cond
(var? ?var)
(assoc (meta ?var) :command ?var)
(if (fn? @?var)
(assoc (meta ?var) :command ?var)
(merge (meta ?var) @?var))

(fn? ?var)
{:command ?var}
Expand Down

0 comments on commit 14b74ba

Please sign in to comment.