diff --git a/archivebox/config/legacy.py b/archivebox/config/legacy.py index f6e22994..6b3bd94b 100644 --- a/archivebox/config/legacy.py +++ b/archivebox/config/legacy.py @@ -595,16 +595,20 @@ def setup_django(out_dir: Path | None=None, check_db=False, config: benedict=CON django.setup() except Exception as e: bump_startup_progress_bar(advance=1000) - STDERR.print() - STDERR.print(Panel( - f'\n[red]{e.__class__.__name__}[/red]: [yellow]{e}[/yellow]\nPlease check your config and [blue]DATA_DIR[/blue] permissions.\n', - title='\n\n[red][X] Error while trying to load database![/red]', - subtitle='[grey53]NO WRITES CAN BE PERFORMED[/grey53]', - expand=False, - style='bold red', - )) - STDERR.print() - STDERR.print_exception(show_locals=False) + + subcommand = sys.argv[1] if len(sys.argv) > 1 else 'unknown' + if subcommand not in ('help', 'version', '--help', '--version'): + # show error message to user only if they're not running a meta command / just trying to get help + STDERR.print() + STDERR.print(Panel( + f'\n[red]{e.__class__.__name__}[/red]: [yellow]{e}[/yellow]\nPlease check your config and [blue]DATA_DIR[/blue] permissions.\n', + title='\n\n[red][X] Error while trying to load database![/red]', + subtitle='[grey53]NO WRITES CAN BE PERFORMED[/grey53]', + expand=False, + style='bold red', + )) + STDERR.print() + STDERR.print_exception(show_locals=False) return bump_startup_progress_bar() diff --git a/pyproject.toml b/pyproject.toml index a6d5ec63..3b29e5e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "archivebox" -version = "0.8.5rc19" +version = "0.8.5rc20" requires-python = ">=3.10" description = "Self-hosted internet archiving solution." authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}]