mirror of
https://github.com/DeterminateSystems/determinate-nix-action.git
synced 2026-02-24 22:57:12 +00:00
Merge pull request #8 from DeterminateSystems/fix-boolean-handling-in-template
Fix rendering of Booleans
This commit is contained in:
commit
9d0d462c4f
2 changed files with 13 additions and 6 deletions
|
|
@ -16,12 +16,19 @@ def make_inputs_table(inputs):
|
|||
required = input_options.get("required", False)
|
||||
default = input_options.get("default")
|
||||
|
||||
if isinstance(default, bool):
|
||||
default_str = f"`{str(default).lower()}`"
|
||||
elif default is not None:
|
||||
default_str = f"`{default}`"
|
||||
else:
|
||||
default_str = ""
|
||||
|
||||
rows.append(
|
||||
[
|
||||
f"`{input_name}`",
|
||||
input_options["description"],
|
||||
"📍" if required else "",
|
||||
f"`{default}`" if default is not None else "",
|
||||
default_str,
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue