From 47387dd6e9b8f37c70dd77277043aecbe5699b85 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 25 Nov 2019 12:33:52 +0100 Subject: [PATCH] Use the curl CA list if PKI Powershell Module is not available --- src/scripts/win32.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 1707714d..7812e175 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -46,7 +46,11 @@ else { Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir Enable-PhpExtension -Extension openssl, curl -Path $php_dir -Update-PhpCAInfo -Path $php_dir -Source CurrentUser +try { + Update-PhpCAInfo -Path $php_dir -Source CurrentUser +} catch { + Update-PhpCAInfo -Path $php_dir -Source Curl +} if ([Version]$installed.Version -ge '7.4') { Copy-Item "$dir\..\src\ext\php_pcov.dll" -Destination "$($installed.ExtensionsPath)\php_pcov.dll" }