Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.1 kB · 36 lines
12345678910111213141516171819202122232425262728293031323334353637# Auto-restart wrapper for Electron app on Windows host# This runs on the HOST machine, not in the devcontainer# Usage: .\restart-electron.ps1
Set-Location $PSScriptRoot
Write-Host "🎨 Aesthetic Computer - Auto-restart wrapper" -ForegroundColor CyanWrite-Host "→ Working directory: $(Get-Location)" -ForegroundColor GrayWrite-Host "→ Press Ctrl+C to stop" -ForegroundColor GrayWrite-Host ""
$restartCount = 0
while ($true) { if ($restartCount -gt 0) { Write-Host "♻️ Restarting Electron (restart #$restartCount)..." -ForegroundColor Yellow Start-Sleep -Seconds 1 } npm start $exitCode = $LASTEXITCODE if ($exitCode -eq 42) { # Exit code 42 = intentional reboot request $restartCount++ Write-Host "" Write-Host "✓ Reboot request received" -ForegroundColor Green } else { # Any other exit code = stop Write-Host "" Write-Host "✓ Electron exited with code $exitCode" -ForegroundColor Green break }}
Write-Host "👋 Goodbye!" -ForegroundColor Cyan