lksjalk
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled

This commit is contained in:
nose
2025-12-24 05:10:07 -08:00
parent 8e3cf7594e
commit 892fe1cb0a
3 changed files with 55 additions and 70 deletions

View File

@@ -501,6 +501,8 @@ fi
# At this point REPO may still be wrong if mm was invoked outside any project; keep the embedded path as a last resort.
VENV="$REPO/.venv"
# Ensure tools installed into the venv are discoverable to subprocess-based providers
export PATH="$VENV/bin:$PATH"
# Debug mode: set MM_DEBUG=1 to print repository, venv, and import diagnostics
if [ -n "${MM_DEBUG:-}" ]; then

View File

@@ -303,6 +303,8 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO="$SCRIPT_DIR"
VENV="$REPO/.venv"
# Make tools installed into the local venv available in PATH for provider discovery
export PATH="$VENV/bin:$PATH"
PY="$VENV/bin/python"
if [ -x "$PY" ]; then
exec "$PY" -m medeia_macina.cli_entry "$@"
@@ -320,6 +322,9 @@ fi
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$repo = $scriptDir
$venv = Join-Path $repo '.venv'
# Ensure venv Scripts dir is on PATH for provider discovery
$venvScripts = Join-Path $venv 'Scripts'
if (Test-Path $venvScripts) { $env:PATH = $venvScripts + ';' + $env:PATH }
$py = Join-Path $venv 'Scripts\python.exe'
$cli = Join-Path $repo 'CLI.py'
if (Test-Path $py) { & $py -m medeia_macina.cli_entry @args; exit $LASTEXITCODE }
@@ -335,10 +340,10 @@ python -m medeia_macina.cli_entry @args
bat_text = (
"@echo off\r\n"
"set SCRIPT_DIR=%~dp0\r\n"
"set PATH=%SCRIPT_DIR%\.venv\Scripts;%PATH%\r\n"
"if exist \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" \"%SCRIPT_DIR%\\.venv\\Scripts\\python.exe\" -m medeia_macina.cli_entry %*\r\n"
"if exist \"%SCRIPT_DIR%\\CLI.py\" python \"%SCRIPT_DIR%\\CLI.py\" %*\r\n"
"python -m medeia_macina.cli_entry %*\r\n"
"python -m medeia_macina.cli_entry %*\r\n"
)
try:
bat.write_text(bat_text, encoding="utf-8")