Skip to content

Commit 56007fc

Browse files
authored
Update windowsTests.yml
1 parent e964c3d commit 56007fc

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

buildspec/windowsTests.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,9 @@ phases:
99
install:
1010
commands:
1111
# force install java21 while we work throuh path issues
12-
- |
13-
$url = 'https://corretto.aws/downloads/latest/amazon-corretto-21-x64-windows-jdk.msi';
14-
Write-Host ('Downloading from {0}' -f $url);
15-
[ Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
16-
Invoke-WebRequest -Uri $url -OutFile 'corretto_jdk_build.msi';
17-
Start-Process 'corretto_jdk_build.msi' -PassThru | Wait-Process;
18-
Write-Host 'Removing ...';
19-
Remove-Item corretto_jdk_build.msi -Force;
2012
- |
2113
$javaName = "C:\Program Files\Amazon Corretto" | ForEach-Object {
22-
ls $_ | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
14+
ls $_ | Where-Object {$_ -Like "jdk*"} | Sort-Object -Descending -Property Name | Select-Object -first 1 -expandproperty Name
2315
}
2416
$JAVA_HOME = "C:\Program Files\Amazon Corretto\$javaName"
2517
- |

0 commit comments

Comments
 (0)