-
Notifications
You must be signed in to change notification settings - Fork 0
Resolve WSL launch path dynamically #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,8 @@ if ($tfInstalled -match "yes") { | |
|
|
||
| # Step 7: Start TrueForge | ||
| Write-Host "[7/7] Starting TrueForge in WSL..." -ForegroundColor Yellow | ||
| Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -- bash -c 'cd `"/mnt/c/Users/adity/Documents/Mission Control/scripts/wsl`" && bash start-trueforge.sh'" | ||
| $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'" | ||
|
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Launch uses wrong distro Steps 5–6 install Node and TrueForge in the explicitly selected Ubuntu distribution, but the new conversion and launch commands use whichever distribution is currently the WSL default. When another distro is default, TrueForge starts in an environment where the required installation was never performed and can fail at npx. Agent Prompt
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Checkout path breaks command The converted path is interpolated as Bash source inside a PowerShell single-quoted -Command argument without escaping it. A valid checkout path containing an apostrophe (for example C:\Users\O'Brien\repo) terminates the PowerShell string and prevents launch, while Bash substitutions such as $() in a directory name are evaluated inside the generated double-quoted cd operand. Agent Prompt
|
||
| Write-Host " TrueForge starting on http://localhost:8790" -ForegroundColor Green | ||
|
|
||
| # Done | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The setup and installation steps target the Ubuntu distribution, but this launcher invokes the default WSL distribution. If the default distribution is not Ubuntu,
start-trueforge.shruns where the Node.js installation and globally installed TrueForge package are absent, causingnpxto fail. Invoke bothwslpathand the launcher against Ubuntu, or use the same configured distribution consistently. [api mismatch]Severity Level: Major⚠️
Prompt for AI Agent 🤖