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

@ -61,7 +61,10 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
help='URLs matching this filter pattern will be removed from the index.'
)
command = parser.parse_args(args or ())
filter_str = accept_stdin(stdin)
filter_str = None
if not command.filter_patterns:
filter_str = accept_stdin(stdin)
remove(
filter_str=filter_str,