File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ For breaking changes, check [here](#breaking-changes).
6
6
7
7
## Unreleased
8
8
9
- - Fix #91 : keyword options and hyphen options should not mix
9
+ - Fix [ #96 ] ( https://github.com/babashka/cli/issues/96 ) : prevent false defaults from being removed/ignored
10
+ - Fix [ #91 ] ( https://github.com/babashka/cli/issues/91 ) : keyword options and hyphen options should not mix
10
11
11
12
## v0.8.58 (2024-03-12)
12
13
Original file line number Diff line number Diff line change 197
197
(assoc aliases alias k)))
198
198
require (update :require (fnil #(conj % k) #{}))
199
199
validate (update :validate assoc k validate)
200
- default (update :exec-args (fn [new-exec-args]
201
- (assoc new-exec-args k (get exec-args k default ))))))
200
+ (some? default ) (update :exec-args
201
+ (fn [new-exec-args]
202
+ (assoc new-exec-args k (get exec-args k default ))))))
202
203
{}
203
204
spec)))
204
205
560
561
(when (:ref columns)
561
562
(if ref ref " " ))
562
563
(when (or (:default-desc columns)
563
- (:default columns))
564
- (str (or default-desc default " " )))
564
+ (some? ( :default columns) ))
565
+ (str (or default-desc ( str default ) " " )))
565
566
(when (:desc columns)
566
567
(if desc desc " " ))]))
567
568
(if (map? spec)
Original file line number Diff line number Diff line change 203
203
:exec-args {:from :edn , :to :json , :paths [" src" " test" ]}}
204
204
(cli/spec->opts spec nil )))
205
205
(is (= (str/trim "
206
- -p, --pretty Pretty-print output.
206
+ -p, --pretty false Pretty-print output.
207
207
--paths src test Paths of files to transform.
208
208
" ) (str/trim
209
209
(cli/format-opts {:spec [[:pretty {:desc " Pretty-print output."
210
+ :default false
210
211
:alias :p }]
211
212
[:paths {:desc " Paths of files to transform."
212
213
:coerce []
You can’t perform that action at this time.
0 commit comments