mirror of
https://github.com/actions/setup-java.git
synced 2024-11-23 10:09:03 +00:00
12 lines
263 B
PowerShell
12 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"
|
|
}
|