Files
workspace/set-openclaw-node.ps1
aitest 15c4480db1 Add OpenClaw workspace configuration and tools
- Add agent configuration files (AGENTS.md, USER.md, IDENTITY.md, SOUL.md)
- Add git configuration and skills management scripts
- Add frontend/backend analysis tools and reports
- Add DingTalk media sender utilities and documentation
- Fix OpenClaw runtime environment (Node.js and Python)
- Configure git remotes and push scripts
2026-03-05 13:56:59 +09:00

26 lines
1.1 KiB
PowerShell

# Set OpenClaw Node to fixed version
# This ensures OpenClaw uses Node v24.14.0 regardless of NVM changes
$OpenclawNodePath = "F:\openclaw-runtime\node-v24.14.0-win-x64\node.exe"
# Check if Node exists
if (Test-Path $OpenclawNodePath) {
Write-Host "Setting OpenClaw Node to: $OpenclawNodePath" -ForegroundColor Green
# Set for current session
$env:OPENCLAW_NODE = $OpenclawNodePath
[System.Environment]::SetEnvironmentVariable("OPENCLAW_NODE", $OpenclawNodePath, "Process")
# Set for user (permanent) - this is redundant but provides clarity
[System.Environment]::SetEnvironmentVariable("OPENCLAW_NODE", $OpenclawNodePath, "User")
Write-Host "OpenClaw Node version:" -ForegroundColor Cyan
& $OpenclawNodePath --version
Write-Host "Environment variable OPENCLAW_NODE has been set permanently." -ForegroundColor Yellow
Write-Host "Note: gateway.cmd already uses hardcoded path, so this is for future compatibility." -ForegroundColor Yellow
} else {
Write-Host "Error: Node not found at $OpenclawNodePath" -ForegroundColor Red
Write-Host "Please check if OpenClaw runtime is installed." -ForegroundColor Red
}