fix: better user information if a needed package is not installed
This commit is contained in:
parent
2f7711d989
commit
8ac603100d
1 changed files with 10 additions and 2 deletions
|
@ -403,7 +403,7 @@ suffix:
|
||||||
disabled:
|
disabled:
|
||||||
variable: upgrade"""
|
variable: upgrade"""
|
||||||
for process in processes:
|
for process in processes:
|
||||||
if processes[process] or process == "output":
|
if processes[process]:
|
||||||
objects = processes[process]
|
objects = processes[process]
|
||||||
rougail_process += """
|
rougail_process += """
|
||||||
{NAME}:
|
{NAME}:
|
||||||
|
@ -443,14 +443,22 @@ suffix:
|
||||||
DEFAULT=objects[0]["name"]
|
DEFAULT=objects[0]["name"]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
if process == 'output':
|
||||||
|
prop = 'hidden'
|
||||||
|
else:
|
||||||
|
prop = 'disabled'
|
||||||
rougail_process += """
|
rougail_process += """
|
||||||
{NAME}:
|
{NAME}:
|
||||||
description: Select for {NAME}
|
description: Select for {NAME}
|
||||||
hidden: true
|
|
||||||
mandatory: false
|
mandatory: false
|
||||||
|
{PROP}: true
|
||||||
multi: true
|
multi: true
|
||||||
|
default: ["You haven't installed \\\"{NAME}\\\" package for rougail"]
|
||||||
|
validators:
|
||||||
|
- jinja: Please install a rougail-{NAME}-* package.
|
||||||
""".format(
|
""".format(
|
||||||
NAME=normalize_family(process),
|
NAME=normalize_family(process),
|
||||||
|
PROP=prop,
|
||||||
)
|
)
|
||||||
rougail_options += rougail_process
|
rougail_options += rougail_process
|
||||||
convert = FakeRougailConvert(add_extra_options)
|
convert = FakeRougailConvert(add_extra_options)
|
||||||
|
|
Loading…
Reference in a new issue