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

@ -1,5 +1,14 @@
.. currentmodule:: flask .. currentmodule:: flask
Version 1.1.2
-------------
Unreleased
- Work around an issue when running the ``flask`` command with an
external debugger on Windows. :issue:`3297`
Version 1.1.1 Version 1.1.1
------------- -------------

View file

@ -57,4 +57,4 @@ from .signals import template_rendered
from .templating import render_template from .templating import render_template
from .templating import render_template_string from .templating import render_template_string
__version__ = "1.1.1" __version__ = "1.1.2.dev"

View file

@ -963,7 +963,8 @@ debug mode.
def main(as_module=False): 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__": if __name__ == "__main__":