Skip to content

Commit

Permalink
Fix colors when displaying plugin versions (#3886)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Apr 21, 2023
1 parent ebe109e commit 09afe55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/molecule/shell.py
Expand Up @@ -62,12 +62,13 @@ def print_version(ctx, param, value):

msg += f" [repr.attrib_name]ansible[/][dim]:[/][repr.number]{app.runtime.version}[/]"
for driver in drivers():
msg += f"\n [repr.attrib_name]{str(driver)}[/][dim]:[/][repr.number]{driver.version}[/][dim] from {driver.module}[/]"
msg += f"\n [repr.attrib_name]{str(driver)}[/][dim]:[/][repr.number]{driver.version}[/][dim] from {driver.module}"
if driver.required_collections:
msg += " requiring collections:"
for name, version in driver.required_collections.items():
msg += f" {name}>={version}"
console.print(msg)
msg += f" [repr.attrib_name]{name}[/]>=[repr.number]{version}[/]"
msg += "[/]"
console.print(msg, highlight=False)

ctx.exit()

Expand Down

0 comments on commit 09afe55

Please sign in to comment.