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 $StartTime = Get-Date
$FailCount = 0 $FailCount = 0
# Locate Perl — required by openssl-sys build script (bundled-sqlcipher-vendored-openssl) # Locate Strawberry Perl — required by openssl-sys build script.
if (-not (Get-Command perl -ErrorAction SilentlyContinue)) { # Always prefer Strawberry Perl over Git's MSYS2 perl (which lacks required modules).
$PerlCandidates = @( $StrawberryPerlCandidates = @(
"C:\Strawberry\perl\bin", "C:\Strawberry\perl\bin",
"C:\Perl\bin", "D:\Strawberry\perl\bin",
"C:\Program Files\Git\usr\bin", "C:\Perl64\bin",
"C:\Program Files (x86)\Git\usr\bin" "C:\Perl\bin",
) "D:\Perl64\bin",
foreach ($perlDir in $PerlCandidates) { "D:\Perl\bin"
if (Test-Path "$perlDir\perl.exe") { )
$env:PATH = "$perlDir;$env:PATH" $StrawberryFound = $false
Write-Host " INFO: Found perl at $perlDir\perl.exe" -ForegroundColor Yellow foreach ($perlDir in $StrawberryPerlCandidates) {
break 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
} }
} }