1
0
Fork 0
mirror of https://github.com/actions/setup-java synced 2024-12-22 21:22:41 +00:00
setup-java/__tests__/verify-java.ps1
2020-02-11 19:38:16 -05:00

11 lines
263 B
PowerShell

if (!$args.Count -or !$args[0])
{
throw "Must supply java version argument"
}
$java_version = & cmd.exe /c "java -version 2>&1" | Out-String
Write-Host "Found java version: $java_version"
if (!$java_version.Contains($args[0]))
{
throw "Unexpected version"
}