forked from kenzuya/unshackle
fix(services): ignore tracked bytecode in the service-repo dirty check
Importing services rewrites upstream-committed __pycache__/*.pyc and was treated as local source edits, blocking refresh. Ignore bytecode and .DS_Store in the dirty check, restore those paths before pull, and disable bytecode writes while loading services. Port of vinefeeder/TwinVine#18 (merged).
This commit is contained in:
@@ -28,6 +28,10 @@ log = logging.getLogger("services")
|
||||
DIRTY_REPOS: list[str] = []
|
||||
SHADOWED: list[str] = []
|
||||
|
||||
# Service clones live inside the tree; writing bytecode there rewrites tracked ``.pyc``
|
||||
# files (when upstream committed them) and floods untracked ``__pycache__`` dirs.
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
|
||||
def discover_services() -> tuple[list[Path], list[str]]:
|
||||
"""Resolve the configured service dirs and glob every ``TAG/__init__.py``.
|
||||
|
||||
Reference in New Issue
Block a user