From f723216ebf2c1a34608e1fc4cb29545248d4a2b9 Mon Sep 17 00:00:00 2001 From: Koncopd Date: Tue, 15 Oct 2024 11:59:43 +0200 Subject: [PATCH] deprecate --key --- lamin_cli/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lamin_cli/__main__.py b/lamin_cli/__main__.py index 7d9cf03..8c55f35 100644 --- a/lamin_cli/__main__.py +++ b/lamin_cli/__main__.py @@ -98,7 +98,7 @@ def main(): @main.command() @click.argument("user", type=str, default=None, required=False) -@click.option("--key", type=str, default=None, help="The API key.") +@click.option("--key", type=str, default=None, help="The legacy API key.") def login(user: str, key: Optional[str]): """Log into LaminHub. @@ -118,6 +118,12 @@ def login(user: str, key: Optional[str]): else: api_key = None + if key is not None: + click.echo( + "--key is deprecated and will be removed in the future, " + "use `lamin login` and enter your API key." + ) + return login_(user, key=key, api_key=api_key)