diff options
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/config.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/config.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/config.py b/packages/meshbay-node/src/meshbay_node/config.py index 2cd8a8f..eb694ae 100644 --- a/packages/meshbay-node/src/meshbay_node/config.py +++ b/packages/meshbay-node/src/meshbay_node/config.py @@ -403,7 +403,11 @@ def load_config(path: Path = DEFAULT_CONFIG_PATH) -> Config: cfg = Config() if path.exists(): - raw = tomllib.loads(path.read_text(encoding="utf-8")) + # utf-8-sig: Windows PowerShell 5.1's `Set-Content -Encoding utf8` and + # older Notepads write a BOM, which TOML refuses -- and a service node + # then stopped before it had said anything (found editing node.toml + # on a real install). + raw = tomllib.loads(path.read_text(encoding="utf-8-sig")) hub = raw.get("hub", {}) cfg.hub.url = hub.get("url", cfg.hub.url) |