cli: fix memerror in usage
This commit is contained in:
2
cli.carp
2
cli.carp
@@ -271,7 +271,7 @@ optional arguments.")
|
|||||||
(Option.long arg) (Option.short arg) (Option.description arg)))
|
(Option.long arg) (Option.short arg) (Option.description arg)))
|
||||||
(when @(Option.required? arg) (IO.print " REQUIRED"))
|
(when @(Option.required? arg) (IO.print " REQUIRED"))
|
||||||
(when (Maybe.just? (Option.default arg))
|
(when (Maybe.just? (Option.default arg))
|
||||||
(IO.print &(fmt " (default: %s)" &(Maybe.unsafe-from @(Option.default arg)))))
|
(IO.print &(fmt " (default: %s)" &(str &(Maybe.unsafe-from @(Option.default arg))))))
|
||||||
(match @(Option.options arg)
|
(match @(Option.options arg)
|
||||||
(Maybe.Just o)
|
(Maybe.Just o)
|
||||||
(IO.print &(fmt " (options: %s)" &(join ", " &(Array.copy-map &str &o))))
|
(IO.print &(fmt " (options: %s)" &(join ", " &(Array.copy-map &str &o))))
|
||||||
|
Reference in New Issue
Block a user