From 3b9e48ead8f89aa8fd07790caa0480422754a3c7 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 3 Oct 2024 03:10:36 -0700 Subject: [PATCH] show deprecation warning for archivebox setup command --- archivebox/cli/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archivebox/cli/__init__.py b/archivebox/cli/__init__.py index 2da2901c..b5bcdff7 100644 --- a/archivebox/cli/__init__.py +++ b/archivebox/cli/__init__.py @@ -22,7 +22,9 @@ BUILTIN_LIST = list CLI_DIR = Path(__file__).resolve().parent # rewrite setup -> install for backwards compatibility -if sys.argv[1] == 'setup': +if len(sys.argv) > 1 and sys.argv[1] == 'setup': + from rich import print + print(':warning: [bold red]DEPRECATED[/bold red] `archivebox setup` is deprecated, use `archivebox install` instead') sys.argv[1] = 'install'