f
This commit is contained in:
@@ -939,6 +939,19 @@ def main() -> int:
|
|||||||
# Install the project into the local venv (editable mode is the default, opinionated)
|
# Install the project into the local venv (editable mode is the default, opinionated)
|
||||||
if not args.quiet:
|
if not args.quiet:
|
||||||
print("Installing project into local venv (editable mode)")
|
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")])
|
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
|
# 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)
|
user_bin.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
mm_sh = user_bin / "mm"
|
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 = (
|
sh_text = (
|
||||||
"#!/usr/bin/env bash\n"
|
"#!/usr/bin/env bash\n"
|
||||||
"set -e\n"
|
"set -e\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user