forked from orbit-oss/flask
Add --debug option to flask run
This commit is contained in:
parent
79032ca5f1
commit
4bc0e4943d
2 changed files with 9 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ Unreleased
|
|||
templates this behavior can be changed with the ``autoescape`` tag.
|
||||
:issue:`4831`
|
||||
- Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`
|
||||
- Add ``--debug`` option to the ``flask run`` command. :issue:`4777`
|
||||
|
||||
|
||||
Version 2.2.2
|
||||
|
|
|
|||
|
|
@ -837,6 +837,11 @@ class SeparatedPathType(click.Path):
|
|||
expose_value=False,
|
||||
help="The key file to use when specifying a certificate.",
|
||||
)
|
||||
@click.option(
|
||||
"--debug/--no-debug",
|
||||
default=None,
|
||||
help="Enable or disable the debug mode.",
|
||||
)
|
||||
@click.option(
|
||||
"--reload/--no-reload",
|
||||
default=None,
|
||||
|
|
@ -878,6 +883,7 @@ def run_command(
|
|||
info,
|
||||
host,
|
||||
port,
|
||||
debug,
|
||||
reload,
|
||||
debugger,
|
||||
with_threads,
|
||||
|
|
@ -910,7 +916,8 @@ def run_command(
|
|||
# command fails.
|
||||
raise e from None
|
||||
|
||||
debug = get_debug_flag()
|
||||
if debug is None:
|
||||
debug = get_debug_flag()
|
||||
|
||||
if reload is None:
|
||||
reload = debug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue