mirror of
https://github.com/Sea-Haven-Industries/stampli-bulk-editor.git
synced 2026-09-30 03:23:13 +00:00
Fix bundled app failing to find Chromium browser
Set PLAYWRIGHT_BROWSERS_PATH to ~/Library/Caches/ms-playwright/ so the PyInstaller .app uses the system-wide browser cache instead of looking inside its own bundle.
This commit is contained in:
parent
53aa0b7525
commit
1789eae0b5
1 changed files with 8 additions and 0 deletions
|
|
@ -1,9 +1,17 @@
|
|||
"""Shared logic for Stampli bulk editor — used by both CLI scripts and the GUI."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
# Use system-wide Playwright browser cache so the bundled app doesn't
|
||||
# look for browsers inside its own .app bundle.
|
||||
_pw_cache = Path.home() / "Library" / "Caches" / "ms-playwright"
|
||||
if _pw_cache.is_dir():
|
||||
os.environ.setdefault("PLAYWRIGHT_BROWSERS_PATH", str(_pw_cache))
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
PROJECT_DIR = Path(__file__).parent
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue