From 9f4e3f86bd5e79a7a60d1b18446db2ee45495bee Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:53:48 -0600 Subject: [PATCH] fix: default cmd help types (#203) Fixes https://github.com/jdx/mise/issues/3671 --- lib/src/docs/cli/templates/spec_template_long.tera | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/docs/cli/templates/spec_template_long.tera b/lib/src/docs/cli/templates/spec_template_long.tera index b6e3e86..07a6089 100644 --- a/lib/src/docs/cli/templates/spec_template_long.tera +++ b/lib/src/docs/cli/templates/spec_template_long.tera @@ -11,7 +11,7 @@ Commands: {%- for name, cmd in cmd.subcommands %} {{ cmd.usage | trim }} {%- if cmd.aliases %} [aliases: {{ cmd.aliases | join(sep=", ") }}]{% endif %} -{%- set help = cmd.help_long | default(value=cmd.help) %} +{%- set help = cmd.help_long | default(value=cmd.help | default(value='')) %} {%- if help %} {{ help | indent(width=4) }} {%- endif %} @@ -25,7 +25,7 @@ Commands: Arguments: {%- for arg in cmd.args %} {{ arg.usage | trim }} -{%- set help = arg.help_long | default(value=arg.help) %} +{%- set help = arg.help_long | default(value=arg.help | default(value='')) %} {%- if help %} {{ help | indent(width=2) }} {%- endif %} @@ -41,7 +41,7 @@ Flags: {%- for flag in cmd.flags %} {{ flag.usage | trim }} {%- if flag.aliases %} [aliases: {{ flag.aliases | join(sep=", ") }}]{% endif %} -{%- set help = flag.help_long | default(value=flag.help) %} +{%- set help = flag.help_long | default(value=flag.help | default(value='')) %} {%- if help %} {{ help | indent(width=2) }} {%- endif %}