Update Validate-PHP.ps1

Add validation for composer install
This commit is contained in:
Michael Mainer
2020-03-20 01:50:21 -07:00
committed by GitHub
parent a4c66572ab
commit 030197e844

View File

@@ -33,6 +33,32 @@ else
exit 1 exit 1
} }
# Verify that composer.exe is on the path
if(Get-Command -Name 'composer')
{
Write-Host "$(composer --version) is on the path."
}
else
{
Write-Host "composer is not on the path."
exit 1
}
# Get the composer version.
$composerVersion = $(composer --version)
# Add composer version details in Markdown
$SoftwareName = "Composer"
$Description = @"
#### $composerVersion
_Environment:_
* PATH: contains the location of composer.exe version $composerVersion
* PHPROOT: root directory of the Composer $composerVersion installation
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Get available versions of PHP # Get available versions of PHP
$phpVersionOnPath = Get-PHPVersion -phpRootPath "C:\tools\php72" $phpVersionOnPath = Get-PHPVersion -phpRootPath "C:\tools\php72"