-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.ps1
More file actions
23 lines (19 loc) · 783 Bytes
/
Copy pathrun.ps1
File metadata and controls
23 lines (19 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $root
$nodeCommand = Get-Command node -ErrorAction SilentlyContinue
$nodePath = if ($nodeCommand) { $nodeCommand.Source } else { $null }
if (-not $nodePath) {
$bundledNode = Join-Path $env:USERPROFILE ".cache\codex-runtimes\codex-primary-runtime\dependencies\node\bin\node.exe"
if (Test-Path $bundledNode) {
$nodePath = $bundledNode
}
}
if (-not $nodePath) {
Write-Host "Node.js 20 or newer is required. Download it from https://nodejs.org/" -ForegroundColor Red
Read-Host "Press Enter to close"
exit 1
}
Write-Host "SideClip is running at http://127.0.0.1:4173" -ForegroundColor Green
Start-Process "http://127.0.0.1:4173"
& $nodePath server.js