Skip to content

Commit f1bf503

Browse files
authored
Make '--debug' a flag instead of a boolean option (#15)
1 parent 7f06eb5 commit f1bf503

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Make `--debug` a flag instead of a boolean option
810

911
## [1.0.1] - 2020-01-30
1012
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Command-line flag | Environment variable | Description
130130
`--target` | `FUNCTION_TARGET` | The name of the exported function to be invoked in response to requests. Default: `function`
131131
`--signature-type` | `FUNCTION_SIGNATURE_TYPE` | The signature used when writing your function. Controls unmarshalling rules and determines which arguments are used to invoke your function. Default: `http`; accepted values: `http` or `event`
132132
`--source` | `FUNCTION_SOURCE` | The path to the file containing your function. Default: `main.py` (in the current working directory)
133-
`--debug` | `DEBUG` | A boolean flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False`
133+
`--debug` | `DEBUG` | A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False`
134134

135135
# Enable CloudEvents
136136

src/functions_framework/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
default="http",
3030
)
3131
@click.option("--port", envvar="PORT", type=click.INT, default=8080)
32-
@click.option("--debug", envvar="DEBUG", type=click.BOOL, default=False)
32+
@click.option("--debug", envvar="DEBUG", is_flag=True)
3333
def cli(target, source, signature_type, port, debug):
3434
host = "0.0.0.0"
3535
app = create_app(target, source, signature_type)

0 commit comments

Comments
 (0)