Skip to content

Commit 27461e2

Browse files
committed
Fix for old net-snmp build while testing
1 parent 014e97f commit 27461e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

php/BuildPhp/private/Set-SnmpTestEnvironment.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ function Set-SnmpTestEnvironment {
4040

4141
$snmpd = Join-Path $env:DEPS_DIR 'bin\snmpd.exe'
4242
if (-not (Test-Path -LiteralPath $snmpd)) {
43-
throw "snmpd.exe not found at $snmpd"
43+
# We have net-snmp builds without snmpd.exe
44+
Get-File -Url 'https://downloads.php.net/~windows/php-sdk/deps/vs16/x64/net-snmp-5.7.3-3-vs16-x64.zip' -OutFile "net-snmp-5.7.3-3-vs16-x64.zip"
45+
Expand-Archive -Path "net-snmp-5.7.3-3-vs16-x64.zip" -DestinationPath $env:DEPS_DIR -Force
46+
if (-not (Test-Path -LiteralPath $snmpd)) {
47+
throw "snmpd.exe not found at $snmpd"
48+
}
4449
}
4550
if(-not(Test-Path snmpd_running)) {
4651
Start-Process -FilePath $snmpd -ArgumentList @('-C','-c', $confPath, '-Ln') -WindowStyle Hidden

0 commit comments

Comments
 (0)