Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function Ensure-OpenClawOnPath {
}

if (-not [string]::IsNullOrWhiteSpace($npmPrefix)) {
$npmBin = Join-Path $npmPrefix "bin"
$npmBin = $npmPrefix
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (-not ($userPath -split ";" | Where-Object { $_ -ieq $npmBin })) {
[Environment]::SetEnvironmentVariable("Path", "$userPath;$npmBin", "User")
Expand All @@ -181,7 +181,7 @@ function Ensure-OpenClawOnPath {
Write-Host "[!] openclaw is not on PATH yet." -ForegroundColor Yellow
Write-Host "Restart PowerShell or add the npm global bin folder to PATH." -ForegroundColor Yellow
if ($npmPrefix) {
Write-Host "Expected path: $npmPrefix\\bin" -ForegroundColor Cyan
Write-Host "Expected path: $npmPrefix" -ForegroundColor Cyan
} else {
Write-Host "Hint: run \"npm config get prefix\" to find your npm global path." -ForegroundColor Gray
}
Expand Down