This commit is contained in:
2026-01-10 22:28:11 -08:00
parent bab2e9168c
commit feffa75c07

View File

@@ -939,6 +939,19 @@ def main() -> int:
# Install the project into the local venv (editable mode is the default, opinionated)
if not args.quiet:
print("Installing project into local venv (editable mode)")
# Clean up old pip-generated entry point wrapper to avoid stale references
import platform
if platform.system() != "Windows":
old_mm = venv_dir / "bin" / "mm"
if old_mm.exists():
try:
old_mm.unlink()
if not args.quiet:
print(f"Removed old entry point wrapper: {old_mm}")
except Exception:
pass
run([str(venv_python), "-m", "pip", "install", "--no-cache-dir", "-e", str(repo_root / "scripts")])
# Verify top-level 'CLI' import and, if missing, attempt to make it available
@@ -1200,6 +1213,13 @@ if (Test-Path (Join-Path $repo 'CLI.py')) {
user_bin.mkdir(parents=True, exist_ok=True)
mm_sh = user_bin / "mm"
# Remove old launcher to overwrite with new one
if mm_sh.exists():
try:
mm_sh.unlink()
except Exception:
pass
sh_text = (
"#!/usr/bin/env bash\n"
"set -e\n"