show deprecation warning for archivebox setup command

This commit is contained in:
Nick Sweeting 2024-10-03 03:10:36 -07:00
parent e315905721
commit 3b9e48ead8
No known key found for this signature in database

View file

@ -22,7 +22,9 @@ BUILTIN_LIST = list
CLI_DIR = Path(__file__).resolve().parent CLI_DIR = Path(__file__).resolve().parent
# rewrite setup -> install for backwards compatibility # 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' sys.argv[1] = 'install'