fix(core): restore adapter command behavior
This commit is contained in:
@@ -19,7 +19,12 @@ def ping_cmd(config: Path = CONFIG_OPT) -> None:
|
||||
raise typer.Exit(code=1)
|
||||
health = build_dwh(cfg).health()
|
||||
if not health.ok:
|
||||
typer.secho(f"ERRORE di connessione: {health.detail}", fg=typer.colors.RED, err=True)
|
||||
message = (
|
||||
f"ERRORE: DWH non accessibile via REST (risposta: {health.detail})."
|
||||
if health.error_kind == "inaccessible"
|
||||
else f"ERRORE di connessione: {health.detail}"
|
||||
)
|
||||
typer.secho(message, fg=typer.colors.RED, err=True)
|
||||
raise typer.Exit(code=1)
|
||||
if health.endpoint:
|
||||
typer.secho(f"OK: connesso via REST a {health.endpoint} (schema {health.schema})",
|
||||
|
||||
Reference in New Issue
Block a user