only accept stdin if args are not passed, fix stdin hang in docker

This commit is contained in:
Nick Sweeting 2021-02-16 01:20:47 -05:00
parent de1a939df4
commit 49939f3eaa
7 changed files with 46 additions and 14 deletions

View file

@ -50,8 +50,11 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
help= "Path to save the single archive folder to, e.g. ./example.com_archive"
)
command = parser.parse_args(args or ())
stdin_url = None
url = command.url
stdin_url = accept_stdin(stdin)
if not url:
stdin_url = accept_stdin(stdin)
if (stdin_url and url) or (not stdin and not url):
stderr(
'[X] You must pass a URL/path to add via stdin or CLI arguments.\n',