diff --git a/install.ps1 b/install.ps1 index eb169c3..d81a628 100644 --- a/install.ps1 +++ b/install.ps1 @@ -37,7 +37,8 @@ $LocalSetFile = Join-Path $ClaudeTarget "settings.local.json" $DebugDir = Join-Path $ClaudeTarget "debug" # ─── openssl 检测 ──────────────────────────────────── -$opensslCmd = (Get-Command openssl -ErrorAction SilentlyContinue)?.Source +$cmd = Get-Command openssl -ErrorAction SilentlyContinue +$opensslCmd = if ($cmd) { $cmd.Source } else { $null } if (-not $opensslCmd) { $searchPaths = @("C:\Program Files\Git\usr\bin\openssl.exe", "D:\Git\usr\bin\openssl.exe", "D:\Git\mingw64\bin\openssl.exe", "C:\Program Files\Git\mingw64\bin\openssl.exe") $opensslCmd = $searchPaths | Where-Object { Test-Path $_ } | Select-Object -First 1