mirror of
https://github.com/DeterminateSystems/determinate-nix-action.git
synced 2026-02-25 07:07:11 +00:00
Fix rendering of Booleans
This commit is contained in:
parent
44b49325b1
commit
7bdbe146aa
2 changed files with 13 additions and 7 deletions
|
|
@ -8,7 +8,6 @@ import sys
|
|||
def eprintln(line):
|
||||
print(line, file=sys.stderr)
|
||||
|
||||
|
||||
def make_inputs_table(inputs):
|
||||
headers = ["Parameter", "Description", "Required", "Default"]
|
||||
rows = []
|
||||
|
|
@ -16,12 +15,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