mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
fix subcommand and args not being passed
This commit is contained in:
parent
322be6b292
commit
0c48449aa6
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ __package__ = 'archivebox.cli'
|
||||||
__command__ = 'archivebox'
|
__command__ = 'archivebox'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from typing import Optional, Dict, List, IO
|
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:
|
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()
|
subcommands = list_subcommands()
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog=__command__,
|
prog=__command__,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue