WebHost: Better document config loading fallback (#5948)

* change functionality to follow comment

* revert code change and explicitly document intent
This commit is contained in:
qwint
2026-02-18 11:51:58 -06:00
committed by GitHub
parent 27a7e538df
commit 3c4c294f9c

View File

@@ -20,7 +20,8 @@ if typing.TYPE_CHECKING:
Utils.local_path.cached_path = os.path.dirname(__file__)
settings.no_gui = True
configpath = os.path.abspath("config.yaml")
if not os.path.exists(configpath): # fall back to config.yaml in home
if not os.path.exists(configpath):
# fall back to config.yaml in user_path if config does not exist in cwd to match settings.py
configpath = os.path.abspath(Utils.user_path('config.yaml'))