Handle errors in comments parsing from metadata [skip ci]

This commit is contained in:
lowlighter
2021-08-19 22:47:26 +02:00
parent fc9d97fd14
commit f8531be6dc

View File

@@ -194,7 +194,7 @@ metadata.plugin = async function({__plugins, name, logger}) {
Object.entries(inputs).map(([key, value]) => [
key,
{
comment:comments[key] ?? "",
comment:comments[key] ?? `# ${value.description}`,
descriptor:yaml.dump({[key]:Object.fromEntries(Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)))}, {quotingType:'"', noCompatMode:true}),
},
]),