Merge pull request #3299 from pallets/click-args

pass sys.argv to flask cli
This commit is contained in:
David Lord 2019-07-10 12:42:58 -07:00 committed by GitHub
commit d694eb443a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,14 @@
.. 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
-------------

View file

@ -57,4 +57,4 @@ from .signals import template_rendered
from .templating import render_template
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):
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__":