Parcourir la source

fix: 强制Python服务使用无头浏览器,避免同步评论时弹出有头浏览器

ethanfly il y a 2 jours
Parent
commit
fc666e004b
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      client/electron/local-services.ts

+ 2 - 0
client/electron/local-services.ts

@@ -362,6 +362,8 @@ function startPythonService(): void {
     PYTHONUNBUFFERED: '1',
     PYTHONIOENCODING: 'utf-8',
     PYTHONDONTWRITEBYTECODE: '1',
+    // 强制 Python Playwright 使用无头模式,避免弹出有头浏览器
+    HEADLESS: 'true',
   };
 
   const pwPath = getPlaywrightBrowsersPath();