Show config in system debug (#1626)

This commit is contained in:
Masen Furer 2023-08-18 15:02:44 -07:00 committed by GitHub
parent 0beb7a409f
commit e6dfe67594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -166,7 +166,15 @@ def output_system_info():
if console.LOG_LEVEL > constants.LogLevel.DEBUG: if console.LOG_LEVEL > constants.LogLevel.DEBUG:
return return
config = get_config()
try:
config_file = sys.modules[config.__module__].__file__
except Exception:
config_file = None
console.rule(f"System Info") console.rule(f"System Info")
console.debug(f"Config file: {config_file!r}")
console.debug(f"Config: {config}")
dependencies = [ dependencies = [
f"[Reflex {constants.VERSION} with Python {platform.python_version()} (PATH: {sys.executable})]", f"[Reflex {constants.VERSION} with Python {platform.python_version()} (PATH: {sys.executable})]",
@ -179,6 +187,7 @@ def output_system_info():
dependencies.extend( dependencies.extend(
[ [
f"[NVM {constants.NVM_VERSION} (Expected: {constants.NVM_VERSION}) (PATH: {constants.NVM_PATH})]", f"[NVM {constants.NVM_VERSION} (Expected: {constants.NVM_VERSION}) (PATH: {constants.NVM_PATH})]",
f"[Bun {prerequisites.get_bun_version()} (Expected: {constants.BUN_VERSION}) (PATH: {config.bun_path})]",
], ],
) )
else: else:

View File

@ -39,7 +39,6 @@ def check_node_version() -> bool:
if constants.IS_WINDOWS if constants.IS_WINDOWS
else current_version == version.parse(constants.NODE_VERSION) else current_version == version.parse(constants.NODE_VERSION)
) )
else:
return False return False