fix: PS 5.1 compat - remove ?. null-conditional operator
This commit is contained in:
parent
666f42a0a4
commit
e5aeeae7f3
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user