config/questions: fix alert display in cli

This commit is contained in:
Alexandre Aubin 2021-09-17 00:39:14 +02:00
parent 88da178cb7
commit 403c36d984

View file

@ -905,8 +905,8 @@ class DisplayTextQuestion(Question):
"warning": "yellow",
"danger": "red",
}
text = m18n.g(self.style) if self.style != "danger" else m18n.n("danger")
return colorize(text, color[self.style]) + f" {text}"
prompt = m18n.g(self.style) if self.style != "danger" else m18n.n("danger")
return colorize(prompt, color[self.style]) + f" {text}"
else:
return text