Fix check for testing tools setup

This commit is contained in:
Shivam Mathur 2020-01-26 17:21:04 +05:30
parent 494dde7189
commit fd2392db56
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -118,7 +118,7 @@ Function Add-Tool() {
Add-Extension mbstring >$null 2>&1
Add-Extension xml >$null 2>&1
}
if (Test-Path $php_dir\$tool) {
if (((Get-ChildItem -Path $php_dir/* | Where-Object Name -Match "^$tool(.exe|.phar)*$").Count -gt 0)) {
Add-Log $tick $tool "Added"
} else {
Add-Log $cross $tool "Could not add $tool"