Skip to content

Commit 69c76e6

Browse files
authored
[Setup] Handle env variable DEBUG = "" (#8431)
1 parent 6804284 commit 69c76e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def write_to_python_file(cls, path: str) -> None:
170170
# set to a non-empty value, the build type is Debug. Otherwise, the build type
171171
# is Release.
172172
def get_build_type(is_debug=None) -> str:
173-
debug = int(os.environ.get("DEBUG", 0)) if is_debug is None else is_debug
173+
debug = int(os.environ.get("DEBUG", 0) or 0) if is_debug is None else is_debug
174174
cfg = "Debug" if debug else "Release"
175175
return cfg
176176

0 commit comments

Comments
 (0)