Skip to content

Commit ec17eee

Browse files
committed
Remove debug print. Improve error prints.
1 parent 4731e04 commit ec17eee

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/render_engine_cli/cli.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
validate_module_site,
2626
)
2727

28-
click.echo("[bold green]In the new CLI[/bold green]", color=True)
29-
3028

3129
@click.group()
3230
def app():
@@ -87,9 +85,10 @@ def init(template: str, extra_context: str, no_input: bool, output_dir: Path, co
8785
try:
8886
from cookiecutter.main import cookiecutter
8987
except ImportError:
90-
click.echo(
88+
click.secho(
9189
"You need to install cookiecutter to use this command. Run `pip install cookiecutter` to install it.",
9290
err=True,
91+
fg="red",
9392
)
9493
raise click.Exit(0)
9594
extra_context = json.loads(extra_context) if extra_context else None

src/render_engine_cli/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ def load_config(self, config_file: str = CONFIG_FILE_NAME):
5252
toml.load(stored_config_file).get("tool", {}).get("render-engine", {}).get("cli", {})
5353
)
5454
except TomlDecodeError as exc:
55-
click.echo(f"Encountered an error while parsing {config_file} - {exc}.")
55+
click.echo(
56+
f"{click.style(f'Encountered an error while parsing {config_file}', fg='red')}\n{exc}\n",
57+
err=True,
58+
)
5659
else:
5760
click.echo(f"Config loaded from {config_file}")
5861
except FileNotFoundError:

0 commit comments

Comments
 (0)