pass sys.argv to flask cli

This commit is contained in:
David Lord 2019-07-10 11:45:20 -07:00
parent ffc68840f8
commit c478e5d52f
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 12 additions and 2 deletions

View file

@ -963,7 +963,8 @@ debug mode.
def main(as_module=False):
cli.main(prog_name="python -m flask" if as_module else None)
# TODO omit sys.argv once https://github.com/pallets/click/issues/536 is fixed
cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
if __name__ == "__main__":