fix(scripts): add D:\Strawberry perl path to verify_agent_work.ps1

This commit is contained in:
Mike Kell 2026-08-22 09:36:53 -04:00
parent f13d044111
commit 7f74656889
1 changed files with 26 additions and 16 deletions

View File

@ -9,23 +9,33 @@ $RootDir = "$PSScriptRoot\.."
$StartTime = Get-Date
$FailCount = 0
# Locate Perl — required by openssl-sys build script (bundled-sqlcipher-vendored-openssl)
if (-not (Get-Command perl -ErrorAction SilentlyContinue)) {
$PerlCandidates = @(
"C:\Strawberry\perl\bin",
"C:\Perl\bin",
"C:\Program Files\Git\usr\bin",
"C:\Program Files (x86)\Git\usr\bin"
)
foreach ($perlDir in $PerlCandidates) {
if (Test-Path "$perlDir\perl.exe") {
$env:PATH = "$perlDir;$env:PATH"
Write-Host " INFO: Found perl at $perlDir\perl.exe" -ForegroundColor Yellow
break
}
# Locate Strawberry Perl — required by openssl-sys build script.
# Always prefer Strawberry Perl over Git's MSYS2 perl (which lacks required modules).
$StrawberryPerlCandidates = @(
"C:\Strawberry\perl\bin",
"D:\Strawberry\perl\bin",
"C:\Perl64\bin",
"C:\Perl\bin",
"D:\Perl64\bin",
"D:\Perl\bin"
)
$StrawberryFound = $false
foreach ($perlDir in $StrawberryPerlCandidates) {
if (Test-Path "$perlDir\perl.exe") {
# Prepend to PATH so it takes priority over Git's perl
$env:PATH = "$perlDir;$env:PATH"
Write-Host " INFO: Using Strawberry Perl at $perlDir\perl.exe" -ForegroundColor Yellow
$StrawberryFound = $true
break
}
if (-not (Get-Command perl -ErrorAction SilentlyContinue)) {
Write-Host " WARN: perl not found - openssl-sys (chronogrid_core/ffi) builds may fail." -ForegroundColor Yellow
}
if (-not $StrawberryFound) {
# Fall back to any perl on PATH
if (Get-Command perl -ErrorAction SilentlyContinue) {
Write-Host " WARN: Strawberry Perl not found; using $(Get-Command perl | Select-Object -ExpandProperty Source)" -ForegroundColor Yellow
Write-Host " openssl-sys may fail if this is Git/MSYS2 perl." -ForegroundColor Yellow
} else {
Write-Host " WARN: perl not found - openssl-sys (chronogrid_core/ffi) builds will fail." -ForegroundColor Yellow
}
}