From 362d4a288c39e854a633598578b1176d3df04d47 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Tue, 29 Apr 2025 05:09:24 -0600 Subject: [PATCH] Fixed Agent Launch Script Error --- Launch-Borealis.ps1 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Launch-Borealis.ps1 b/Launch-Borealis.ps1 index 5a1ea9e..42ad17e 100644 --- a/Launch-Borealis.ps1 +++ b/Launch-Borealis.ps1 @@ -192,7 +192,10 @@ switch ($choice) { $agentRequirements = "Data\Agent\agent-requirements.txt" $agentDestinationFolder = "$venvFolder\Borealis" $agentDestinationFile = "$venvFolder\Borealis\borealis-agent.py" - $venvPython = Join-Path $venvFolder 'Scripts\python.exe' + + # build the absolute path to python.exe inside the venv + $venvPython = Join-Path $scriptDir $venvFolder + $venvPython = Join-Path $venvPython 'Scripts\python.exe' <# Step: Create Virtual Environment & Copy Agent Script @@ -221,11 +224,13 @@ switch ($choice) { <# Step: Launch Agent #> - Push-Location $venvFolder - Write-Host "`nLaunching Borealis Agent..." -ForegroundColor Blue - Write-Host "====================================================================================" - & $venvPython "Borealis\borealis-agent.py" - Pop-Location + Run-Step "Launch Borealis Agent" { + Write-Host "`nLaunching Borealis Agent..." -ForegroundColor Blue + Write-Host "====================================================================================" + # call python with the absolute interpreter path and the absolute script path + $agentScript = Join-Path $scriptDir $agentDestinationFile + & $venvPython $agentScript + } } default {