Skip to content

Commit

Permalink
feat(env): List possible config path locations when not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed Apr 19, 2024
1 parent 959b622 commit 9768de8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions devine/commands/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import click
from rich.padding import Padding
from rich.table import Table
from rich.tree import Tree

from devine.core.config import config, config_path
from devine.core.config import POSSIBLE_CONFIG_PATHS, config, config_path
from devine.core.console import console
from devine.core.constants import context_settings
from devine.core.services import Services
Expand All @@ -25,7 +26,13 @@ def info() -> None:
if config_path:
log.info(f"Config loaded from {config_path}")
else:
log.info("No config file found...")
tree = Tree("No config file found, you can use any of the following locations:")
for i, path in enumerate(POSSIBLE_CONFIG_PATHS, start=1):
tree.add(f"[repr.number]{i}.[/] [text2]{path.resolve()}[/]")
console.print(Padding(
tree,
(0, 5)
))

table = Table(title="Directories", expand=True)
table.add_column("Name", no_wrap=True)
Expand Down

0 comments on commit 9768de8

Please sign in to comment.