From 4fbee19567ed2867d316bed06ef17405832226b5 Mon Sep 17 00:00:00 2001 From: ADITYA-tp01 Date: Sun, 30 Aug 2026 04:25:18 +0530 Subject: [PATCH] fix: launch TrueForge in WSL via script file for reliable startup --- start.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/start.ps1 b/start.ps1 index e9912b0..65b2611 100644 --- a/start.ps1 +++ b/start.ps1 @@ -82,7 +82,16 @@ if ($wslTf -match "missing") { # Launch TrueForge in WSL Write-Host " Launching TrueForge in WSL..." -ForegroundColor Yellow -Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:`$PATH && cd ~ && npx @truefoundry/trueforge'" +$wslScript = @' +#!/bin/bash +export PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH +cd ~ +npx @truefoundry/trueforge +'@ +$scriptPath = "$env:TEMP\start-tf.sh" +[System.IO.File]::WriteAllText($scriptPath, $wslScript, [System.Text.UTF8Encoding]::new($false)) +Start-Process wsl -ArgumentList "-d Ubuntu -- bash -c 'bash /mnt/c/$($env:TEMP -replace '\\','/')/start-tf.sh'" +Start-Sleep -Seconds 2 Write-Host " TrueForge terminal opened" -ForegroundColor Green # Done