fix(scripts): add cargo and perl auto-discovery to verify_agent_work.ps1
This commit is contained in:
parent
5f714c631c
commit
f13d044111
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue