fix(script): bootstrap sys.path so 'app' imports regardless of cwd in fix_openers
This commit is contained in:
@@ -12,8 +12,13 @@ Usage:
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Make `app` importable no matter what directory the script is invoked from.
|
||||
# The repo layout is <backend>/app ; this script lives in <backend>/scripts/.
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from app.config import Config
|
||||
from app.services.groups import GroupStore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user