From f13d0441110dd1be185f90c75196f29b9cffa151 Mon Sep 17 00:00:00 2001 From: Mike Kell Date: Sat, 22 Aug 2026 09:26:07 -0400 Subject: [PATCH] fix(scripts): add cargo and perl auto-discovery to verify_agent_work.ps1 --- scripts/verify_agent_work.ps1 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/verify_agent_work.ps1 b/scripts/verify_agent_work.ps1 index fa6a237..ed36b09 100644 --- a/scripts/verify_agent_work.ps1 +++ b/scripts/verify_agent_work.ps1 @@ -9,13 +9,35 @@ $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 + } + } + if (-not (Get-Command perl -ErrorAction SilentlyContinue)) { + Write-Host " WARN: perl not found - openssl-sys (chronogrid_core/ffi) builds may fail." -ForegroundColor Yellow + } +} + # Locate cargo — try common install locations if not already on PATH $CargoExe = "cargo" if (-not (Get-Command cargo -ErrorAction SilentlyContinue)) { $CandidatePaths = @( "$env:USERPROFILE\.cargo\bin\cargo.exe", "C:\Users\$env:USERNAME\.cargo\bin\cargo.exe", - "$env:LOCALAPPDATA\Programs\Rust\bin\cargo.exe" + "D:\Users\$env:USERNAME\.cargo\bin\cargo.exe", + "$env:LOCALAPPDATA\Programs\Rust\bin\cargo.exe", + "C:\Users\mtkel\.cargo\bin\cargo.exe" ) foreach ($candidate in $CandidatePaths) { if (Test-Path $candidate) {