Skip to content

Commit f2e8f51

Browse files
authored
Merge pull request #525 from lemeurherveCB/remove-replace-in-windows-images
chore(windows): remove `.Replace` from `$msiUrl`
2 parents 23af8d0 + a895468 commit f2e8f51

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

windows/nanoserver/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $Progress
3232
ARG JAVA_VERSION
3333
RUN New-Item -ItemType Directory -Path C:\temp | Out-Null ; `
3434
$javaMajorVersion = $env:JAVA_VERSION.substring(0,2) ; `
35-
$msiUrl = 'https://api.adoptium.net/v3/installer/version/jdk-{0}/windows/x64/jdk/hotspot/normal/eclipse?project=jdk' -f $env:JAVA_VERSION.Replace('_', '%2B') ; `
35+
$msiUrl = 'https://api.adoptium.net/v3/installer/version/jdk-{0}/windows/x64/jdk/hotspot/normal/eclipse?project=jdk' -f $env:JAVA_VERSION ; `
3636
Invoke-WebRequest $msiUrl -OutFile 'C:\temp\jdk.msi' ; `
3737
$proc = Start-Process -FilePath 'msiexec.exe' -ArgumentList '/i', 'C:\temp\jdk.msi', '/L*V', 'C:\temp\OpenJDK.log', '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', "INSTALLDIR=C:\openjdk-${javaMajorVersion}" -Wait -Passthru ; `
3838
$proc.WaitForExit() ; `

windows/windowsservercore/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
3232
ARG JAVA_VERSION
3333
RUN New-Item -ItemType Directory -Path C:\temp | Out-Null ; `
3434
$javaMajorVersion = $env:JAVA_VERSION.substring(0,2) ; `
35-
$msiUrl = 'https://api.adoptium.net/v3/installer/version/jdk-{0}/windows/x64/jdk/hotspot/normal/eclipse?project=jdk' -f $env:JAVA_VERSION.Replace('_', '%2B') ; `
35+
$msiUrl = 'https://api.adoptium.net/v3/installer/version/jdk-{0}/windows/x64/jdk/hotspot/normal/eclipse?project=jdk' -f $env:JAVA_VERSION ; `
3636
Invoke-WebRequest $msiUrl -OutFile 'C:\temp\jdk.msi' ; `
3737
$proc = Start-Process -FilePath 'msiexec.exe' -ArgumentList '/i', 'C:\temp\jdk.msi', '/L*V', 'C:\temp\OpenJDK.log', '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', "INSTALLDIR=C:\openjdk-${javaMajorVersion}" -Wait -Passthru ; `
3838
$proc.WaitForExit() ; `

0 commit comments

Comments
 (0)