From 0c48449aa64c58fc350a40d39c3062e90e457a2d Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 2 Jul 2020 04:00:51 -0400 Subject: [PATCH] fix subcommand and args not being passed --- archivebox/cli/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archivebox/cli/__init__.py b/archivebox/cli/__init__.py index ece64f8b..8d06855a 100644 --- a/archivebox/cli/__init__.py +++ b/archivebox/cli/__init__.py @@ -2,6 +2,7 @@ __package__ = 'archivebox.cli' __command__ = 'archivebox' import os +import sys import argparse from typing import Optional, Dict, List, IO @@ -65,6 +66,7 @@ SUBCOMMANDS = list_subcommands() def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None) -> None: + args = sys.argv[1:] if args is None else args subcommands = list_subcommands() parser = argparse.ArgumentParser( prog=__command__,