인셔셔RSS 관심 있는 블로그, 뉴스, 기술 정보를 효율적으로 추적하고 읽으세요
원문 읽기 InertiaRSS에서 열기

추천 피드

Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
爱范儿
爱范儿
WordPress大学
WordPress大学
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
B
Blog
博客园 - 叶小钗
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
H
Help Net Security
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
月光博客
月光博客

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(installer): tolerate WSL UNC launch cwd · openclaw/op...
vincentkoc · 2026-05-23 · via Recent Commits to openclaw:main

@@ -623,6 +623,53 @@ function Get-PnpmCommandPath {

623623

return (Resolve-CommandPath -Candidates @("pnpm.cmd", "pnpm.exe", "pnpm"))

624624

}

625625626+

function Get-WindowsCommandSafeDirectory {

627+

$userHome = [Environment]::GetFolderPath("UserProfile")

628+

if (-not [string]::IsNullOrWhiteSpace($userHome) -and (Test-Path $userHome)) {

629+

return $userHome

630+

}

631+

if (-not [string]::IsNullOrWhiteSpace($env:TEMP) -and (Test-Path $env:TEMP)) {

632+

return $env:TEMP

633+

}

634+

return $null

635+

}

636+637+

function Invoke-CommandFromWindowsSafeDirectory {

638+

param(

639+

[Parameter(Mandatory = $true)]

640+

[string]$CommandPath,

641+

[string[]]$Arguments = @()

642+

)

643+644+

$safeDir = Get-WindowsCommandSafeDirectory

645+

$pushedLocation = $false

646+

try {

647+

if (-not [string]::IsNullOrWhiteSpace($safeDir)) {

648+

Push-Location -LiteralPath $safeDir

649+

$pushedLocation = $true

650+

}

651+

& $CommandPath @Arguments

652+

} finally {

653+

if ($pushedLocation) {

654+

Pop-Location

655+

}

656+

}

657+

}

658+659+

function Invoke-NpmCommand {

660+

param([string[]]$Arguments = @())

661+

Invoke-CommandFromWindowsSafeDirectory -CommandPath (Get-NpmCommandPath) -Arguments $Arguments

662+

}

663+664+

function Invoke-CorepackCommand {

665+

param([string[]]$Arguments = @())

666+

$corepackCommand = Get-CorepackCommandPath

667+

if (-not $corepackCommand) {

668+

throw "corepack not found on PATH."

669+

}

670+

Invoke-CommandFromWindowsSafeDirectory -CommandPath $corepackCommand -Arguments $Arguments

671+

}

672+626673

function Get-NpmGlobalBinCandidates {

627674

param(

628675

[string]$NpmPrefix

@@ -647,7 +694,7 @@ function Ensure-OpenClawOnPath {

647694648695

$npmPrefix = $null

649696

try {

650-

$npmPrefix = (& (Get-NpmCommandPath) config get prefix 2>$null).Trim()

697+

$npmPrefix = (Invoke-NpmCommand -Arguments @("config", "get", "prefix") 2>$null).Trim()

651698

} catch {

652699

$npmPrefix = $null

653700

}

@@ -751,8 +798,8 @@ function Ensure-Pnpm {

751798

$corepackCommand = Get-CorepackCommandPath

752799

if ($corepackCommand) {

753800

try {

754-

& $corepackCommand enable | Out-Null

755-

& $corepackCommand prepare $pnpmSpec --activate | Out-Null

801+

Invoke-CorepackCommand -Arguments @("enable") | Out-Null

802+

Invoke-CorepackCommand -Arguments @("prepare", $pnpmSpec, "--activate") | Out-Null

756803

if (Test-PnpmCommandMatchesVersion -PnpmVersion $pnpmVersion -RepoDir $RepoDir) {

757804

Write-Host "[OK] pnpm installed via corepack ($pnpmSpec)" -ForegroundColor Green

758805

return

@@ -765,7 +812,7 @@ function Ensure-Pnpm {

765812

$prevScriptShell = $env:NPM_CONFIG_SCRIPT_SHELL

766813

$env:NPM_CONFIG_SCRIPT_SHELL = "cmd.exe"

767814

try {

768-

& (Get-NpmCommandPath) install -g $pnpmSpec

815+

Invoke-NpmCommand -Arguments @("install", "-g", $pnpmSpec)

769816

} finally {

770817

$env:NPM_CONFIG_SCRIPT_SHELL = $prevScriptShell

771818

}

@@ -776,6 +823,52 @@ function Ensure-Pnpm {

776823

}

777824778825

# Install OpenClaw

826+

function Resolve-LocalNpmPackagePath {

827+

param([string]$PackagePath)

828+829+

try {

830+

return (Resolve-Path -LiteralPath $PackagePath -ErrorAction Stop).ProviderPath

831+

} catch {

832+

return [System.IO.Path]::GetFullPath($PackagePath)

833+

}

834+

}

835+836+

function Resolve-LocalNpmPackageInstallSpec {

837+

param([string]$InstallSpec)

838+839+

if ([string]::IsNullOrWhiteSpace($InstallSpec)) {

840+

return $InstallSpec

841+

}

842+

if ($InstallSpec -match '^file:(?<path>.+)$') {

843+

$filePath = $Matches["path"]

844+

if (

845+

$filePath -match '^/' -or

846+

$filePath -match '^\\\\' -or

847+

$filePath -match '^[A-Za-z]:[\\/]'

848+

) {

849+

return $InstallSpec

850+

}

851+

return ([System.Uri](Resolve-LocalNpmPackagePath -PackagePath $filePath)).AbsoluteUri

852+

}

853+

if (

854+

$InstallSpec -match '^https?:' -or

855+

$InstallSpec -match '^(git\+|github:)' -or

856+

$InstallSpec -match '^[A-Za-z]:[\\/]' -or

857+

$InstallSpec -match '^\\\\'

858+

) {

859+

return $InstallSpec

860+

}

861+

if ($InstallSpec -notmatch '^\.\.?[\\/]' -and $InstallSpec -notmatch '\.tgz$') {

862+

return $InstallSpec

863+

}

864+865+

try {

866+

return (Resolve-LocalNpmPackagePath -PackagePath $InstallSpec)

867+

} catch {

868+

return $InstallSpec

869+

}

870+

}

871+779872

function Resolve-NpmOpenClawInstallSpec {

780873

param(

781874

[string]$PackageName,

@@ -795,7 +888,7 @@ function Resolve-NpmOpenClawInstallSpec {

795888

$trimmedTag -match '^\.\.?[\\/]' -or

796889

$trimmedTag -match '\.tgz($|[?#])'

797890

) {

798-

return $trimmedTag

891+

return (Resolve-LocalNpmPackageInstallSpec -InstallSpec $trimmedTag)

799892

}

800893801894

return "$PackageName@$trimmedTag"

@@ -852,9 +945,9 @@ function Install-OpenClaw {

852945

$installSpec = Resolve-NpmOpenClawInstallSpec -PackageName $packageName -RequestedTag $Tag

853946

Write-Host "[*] Installing OpenClaw ($installSpec)..." -ForegroundColor Yellow

854947

$freshnessArgs = @("--min-release-age=0")

855-

$minReleaseAge = (& (Get-NpmCommandPath) config get min-release-age 2>$null)

948+

$minReleaseAge = (Invoke-NpmCommand -Arguments @("config", "get", "min-release-age") 2>$null)

856949

if ($LASTEXITCODE -ne 0 -or -not $minReleaseAge -or $minReleaseAge.Trim() -eq "null" -or $minReleaseAge.Trim() -eq "undefined") {

857-

$beforeValue = (& (Get-NpmCommandPath) config get before 2>$null)

950+

$beforeValue = (Invoke-NpmCommand -Arguments @("config", "get", "before") 2>$null)

858951

if ($LASTEXITCODE -eq 0 -and $beforeValue -and $beforeValue.Trim() -ne "null" -and $beforeValue.Trim() -ne "undefined") {

859952

$freshnessArgs = @("--before=$((Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ"))")

860953

}

@@ -876,7 +969,7 @@ function Install-OpenClaw {

876969

Remove-Item Env:NPM_CONFIG_BEFORE -ErrorAction SilentlyContinue

877970

Remove-Item Env:NPM_CONFIG_MIN_RELEASE_AGE -ErrorAction SilentlyContinue

878971

try {

879-

$npmOutput = & (Get-NpmCommandPath) install -g @freshnessArgs "$installSpec" 2>&1

972+

$npmOutput = Invoke-NpmCommand -Arguments (@("install", "-g") + $freshnessArgs + @("$installSpec")) 2>&1

880973

if ($LASTEXITCODE -ne 0) {

881974

Write-Host "[!] npm install failed" -ForegroundColor Red

882975

if ($npmOutput -match "spawn git" -or $npmOutput -match "ENOENT.*git") {

@@ -1104,7 +1197,7 @@ function Main {

11041197

try {

11051198

$npmCommand = Get-NpmCommandPath

11061199

if ($npmCommand) {

1107-

& $npmCommand uninstall -g openclaw 2>$null | Out-Null

1200+

Invoke-NpmCommand -Arguments @("uninstall", "-g", "openclaw") 2>$null | Out-Null

11081201

Write-Host "[OK] Removed npm global install if present" -ForegroundColor Green

11091202

}

11101203

} catch { }

@@ -1144,7 +1237,7 @@ function Main {

11441237

}

11451238

if (-not $installedVersion) {

11461239

try {

1147-

$npmList = & (Get-NpmCommandPath) list -g --depth 0 --json 2>$null | ConvertFrom-Json

1240+

$npmList = Invoke-NpmCommand -Arguments @("list", "-g", "--depth", "0", "--json") 2>$null | ConvertFrom-Json

11481241

if ($npmList -and $npmList.dependencies -and $npmList.dependencies.openclaw -and $npmList.dependencies.openclaw.version) {

11491242

$installedVersion = $npmList.dependencies.openclaw.version

11501243

}