fix(scripts): add D:\Strawberry perl path to verify_agent_work.ps1
This commit is contained in:
parent
f13d044111
commit
7f74656889
|
|
@ -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",
|
||||||
|
"D:\Strawberry\perl\bin",
|
||||||
|
"C:\Perl64\bin",
|
||||||
"C:\Perl\bin",
|
"C:\Perl\bin",
|
||||||
"C:\Program Files\Git\usr\bin",
|
"D:\Perl64\bin",
|
||||||
"C:\Program Files (x86)\Git\usr\bin"
|
"D:\Perl\bin"
|
||||||
)
|
)
|
||||||
foreach ($perlDir in $PerlCandidates) {
|
$StrawberryFound = $false
|
||||||
|
foreach ($perlDir in $StrawberryPerlCandidates) {
|
||||||
if (Test-Path "$perlDir\perl.exe") {
|
if (Test-Path "$perlDir\perl.exe") {
|
||||||
|
# Prepend to PATH so it takes priority over Git's perl
|
||||||
$env:PATH = "$perlDir;$env:PATH"
|
$env:PATH = "$perlDir;$env:PATH"
|
||||||
Write-Host " INFO: Found perl at $perlDir\perl.exe" -ForegroundColor Yellow
|
Write-Host " INFO: Using Strawberry Perl at $perlDir\perl.exe" -ForegroundColor Yellow
|
||||||
|
$StrawberryFound = $true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (-not (Get-Command perl -ErrorAction SilentlyContinue)) {
|
if (-not $StrawberryFound) {
|
||||||
Write-Host " WARN: perl not found - openssl-sys (chronogrid_core/ffi) builds may fail." -ForegroundColor Yellow
|
# 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue