From e5aeeae7f3526e9d2387494b5a50d383a1f80a8d Mon Sep 17 00:00:00 2001 From: leesu Date: Wed, 1 Apr 2026 16:07:18 +0800 Subject: [PATCH] fix: PS 5.1 compat - remove ?. null-conditional operator --- install.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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