cli: fix memerror in usage

This commit is contained in:
2020-01-30 16:01:11 +01:00
parent cb5c9f0bfe
commit b5eb3a917b

View File

@@ -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))))