diff --git a/launch-windows.ps1 b/launch-windows.ps1 index 263d951270..85e21f32e0 100644 --- a/launch-windows.ps1 +++ b/launch-windows.ps1 @@ -67,7 +67,8 @@ Write-Step "Checking for Python" function Get-PythonVersionText($launcher, $launcherArgs) { try { return (& $launcher @launcherArgs -c "import sys; print('.'.join(map(str, sys.version_info[:3])))" 2>$null).Trim() - } catch { + } + catch { return $null } } @@ -125,7 +126,8 @@ if (-not (Test-Path $venvPy)) { Write-Step "Creating virtual environment (venv)" & $pyExe @pyArgs -m venv venv if ($LASTEXITCODE -ne 0 -or -not (Test-Path $venvPy)) { Fail "Failed to create the virtual environment." } -} else { +} +else { Write-Host "venv already exists - skipping creation." } @@ -166,4 +168,4 @@ if (Test-Path $cudaBase) { Write-Step ("Starting Odysseus at http://{0}:{1}" -f $BindHost, $Port) Write-Host "Press Ctrl+C to stop." Write-Host "" -& $venvPy -m uvicorn app:app --host $BindHost --port $Port +& $venvPy -m uvicorn app:app --host $BindHost --port $Port --loop asyncio