Files
automatic/modules/enso.py
T
CalamitousFelicitousness 5e4819c3e9 run enso extension installer after clone and update
After deletion and re-clone, enso.install() runs after
install_extensions() has already passed, so install.py
was never triggered and the frontend was not built.
2026-03-20 21:43:44 +00:00

27 lines
853 B
Python

import os
from installer import log, git, run_extension_installer
from modules.paths import extensions_dir
ENSO_REPO = "https://github.com/CalamitousFelicitousness/enso.git"
# ENSO_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "extensions-builtin", "enso")
ENSO_DIR = os.path.join(extensions_dir, "enso")
def install():
"""Clone the Enso frontend repo if not already present."""
if os.path.isdir(ENSO_DIR):
return
log.info(f'Enso: folder="{ENSO_DIR}" installing')
git(f'clone "{ENSO_REPO}" "{ENSO_DIR}"')
run_extension_installer(ENSO_DIR)
def update():
"""Pull latest changes for the Enso frontend repo."""
if not os.path.isdir(ENSO_DIR):
return
log.info(f'Enso: folder="{ENSO_DIR}" updating')
git('pull', folder=ENSO_DIR)
run_extension_installer(ENSO_DIR)