diff --git a/kcidev/libs/common.py b/kcidev/libs/common.py index 8ae6b8b..f4fad27 100644 --- a/kcidev/libs/common.py +++ b/kcidev/libs/common.py @@ -27,9 +27,8 @@ def load_toml(settings): config = toml.load(f) if not config: - click.secho( - f"No `{fname}` configuration file found at `{global_path}`, `{user_path}` or `{settings}`", - fg="red", + kci_err( + f"No `{fname}` configuration file found at `{global_path}`, `{user_path}` or `{settings}`" ) raise click.Abort() diff --git a/kcidev/main.py b/kcidev/main.py index 544b2a5..3acfff8 100755 --- a/kcidev/main.py +++ b/kcidev/main.py @@ -34,12 +34,10 @@ def cli(ctx, settings, instance): else: ctx.obj["INSTANCE"] = ctx.obj["CFG"].get("default_instance") if not ctx.obj["INSTANCE"]: - click.secho("No instance defined in settings or as argument", fg="red") + kci_err("No instance defined in settings or as argument") raise click.Abort() if ctx.obj["INSTANCE"] not in ctx.obj["CFG"]: - click.secho( - f"Instance {ctx.obj['INSTANCE']} not found in {settings}", fg="red" - ) + kci_err(f"Instance {ctx.obj['INSTANCE']} not found in {settings}") raise click.Abort() pass