fix(mma_exec): remove hardcoded C:\projects\misc\setup_*.ps1 paths — rely on PATH
This commit is contained in:
@@ -194,10 +194,7 @@ def execute_agent(role: str, prompt: str, docs: list[str], debug: bool = False,
|
||||
command_text += f"\n\nTASK: {prompt}\n\n"
|
||||
# Use subprocess with input to pipe the prompt via stdin, avoiding WinError 206.
|
||||
# We use -p 'mma_task' to ensure non-interactive (headless) mode and valid parsing.
|
||||
ps_command = (
|
||||
f"if (Test-Path 'C:\\projects\\misc\\setup_gemini.ps1') {{ . 'C:\\projects\\misc\\setup_gemini.ps1' }}; "
|
||||
f"gemini -p '{role}' --output-format json --model {model}"
|
||||
)
|
||||
ps_command = f"gemini -p '{role}' --output-format json --model {model}"
|
||||
cmd = ['powershell.exe', '-NoProfile', '-Command', ps_command]
|
||||
try:
|
||||
env = os.environ.copy()
|
||||
|
||||
Reference in New Issue
Block a user