File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3- ## Added
4-
53## Fixed
64
7- ## Changed
5+ - Make sure ` cli/*opts* ` reflects what the main command receives
86
97# 0.14.62 (2024-07-04 / 8a515f3)
108
Original file line number Diff line number Diff line change 364364 (parse-error! " Missing required flags:" (->> missing (map #(str/join " " %)) (str/join " , " )))
365365 (cmd opts)))))
366366
367+ (defn bind-opts-mw []
368+ (fn [cmd]
369+ (fn [opts]
370+ (binding [*opts* opts]
371+ (cmd opts)))))
372+
367373(defn dispatch*
368374 ([cmdspec]
369375 (dispatch* (to-cmdspec cmdspec) *command-line-args*))
382388
383389 (cond
384390 command
385- (let [middleware (into [(missing-flags-mw cmdspec)
391+ (let [middleware (into [(bind-opts-mw )
392+ (missing-flags-mw cmdspec)
386393 (help-mw cmdspec)]
387394 (::middleware opts))
388395 opts (-> opts
You can’t perform that action at this time.
0 commit comments