From 14ad2fc3a416773180e3685ae32707bc76c38956 Mon Sep 17 00:00:00 2001 From: ADITYA-tp01 Date: Sun, 30 Aug 2026 17:30:41 +0530 Subject: [PATCH] fix: Robust TrueForge launch and port assignment --- scripts/wsl/start-trueforge.sh | 6 +----- start.ps1 | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/wsl/start-trueforge.sh b/scripts/wsl/start-trueforge.sh index 4efc1f5..404659e 100644 --- a/scripts/wsl/start-trueforge.sh +++ b/scripts/wsl/start-trueforge.sh @@ -16,15 +16,11 @@ fi export OPENAI_BASE_URL="${OPENAI_BASE_URL:-https://integrate.api.nvidia.com/v1}" -if [ -z "${OPENAI_API_KEY:-}" ] || [ "$OPENAI_API_KEY" = "your-openai-api-key-here" ]; then - echo "start-trueforge.sh: OPENAI_API_KEY is not set. Add it to $REPO_DIR/.env" >&2 - exit 1 -fi - if [ -d "$HOME/.local/node/bin" ]; then export PATH="$HOME/.local/node/bin:$PATH" fi cd "$HOME" export HOST=0.0.0.0 +export PORT=8790 exec npx -y @truefoundry/trueforge \ No newline at end of file diff --git a/start.ps1 b/start.ps1 index 94b01d5..f87e759 100644 --- a/start.ps1 +++ b/start.ps1 @@ -79,8 +79,7 @@ if ($tfInstalled -match "yes") { # Step 7: Start TrueForge Write-Host "[7/7] Starting TrueForge in WSL..." -ForegroundColor Yellow -$wslPath = (wsl -e wslpath -a -u "$PSScriptRoot/scripts/wsl").Trim() -Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -- bash -c 'cd `"$wslPath`" && bash start-trueforge.sh'" +Start-Process powershell -WorkingDirectory "$PSScriptRoot" -ArgumentList "-NoExit", "-Command", "wsl -- bash -c 'cd scripts/wsl && bash start-trueforge.sh'" Write-Host " TrueForge starting on http://localhost:8790" -ForegroundColor Green # Done