mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Update Validate-PHP.ps1
Add validation for composer install
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user