Merge pull request #6532 from Adamact/fix/windows-pwd-import

fix(platform): resolve the service home through platform_compat so native Windows can start
This commit is contained in:
Adam Älgamo
2026-10-07 00:12:27 +02:00
committed by GitHub
parent 2cd02da7fc
commit 430c2718aa
5 changed files with 102 additions and 7 deletions
+1 -5
View File
@@ -14,7 +14,6 @@ import tempfile
import time
import html
import hashlib
import pwd
import urllib.parse
import urllib.request
import uuid
@@ -32,10 +31,7 @@ _ACTIVE_BROWSER_SESSIONS: set[str] = set()
def _service_home() -> Path:
"""Return the account home even when a task overrides ``HOME``."""
try:
return Path(pwd.getpwuid(os.getuid()).pw_dir)
except (KeyError, OSError):
return Path.home()
return platform_compat.service_home()
def _host_npm_roots() -> list[Path]: