fix: error format

This commit is contained in:
egarette@silique.fr 2025-10-16 08:16:11 +02:00
parent 1ef52a2e07
commit 7733d6240f

View file

@ -105,17 +105,11 @@ class RougailOutputConsole:
else:
current_options.setdefault(None, []).append(description)
if options:
self.errors.append(
_("The following variables are mandatory but have no value:")
)
self.errors.append(options)
self.errors.append({_("The following variables are mandatory but have no value:"): options})
elif options_with_error:
self.errors.append(
_(
self.errors.append({_(
"The following variables are inaccessible but are empty and mandatory:"
)
)
self.errors.append([option.description() for option in options_with_error])
): self.errors.append([option.description() for option in options_with_error])})
def exporter(self) -> bool:
if self.is_mandatory:
@ -225,9 +219,8 @@ class RougailOutputConsole:
f"[bold][bright_red]:stop_sign: {_('ERRORS')}[/bright_red][/bold]",
guide_style="bold bright_red",
)
sub_tree = tree
for error in errors:
sub_tree = self.display_error(sub_tree, error)
self.display_error(tree, error)
self.out.append(tree)
def display_error(self, tree, error):