From f7ee6432602bba15a38c7600d0e5660a88135f4a Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 10 Oct 2024 21:26:47 -0400 Subject: [PATCH] Resolve scoop Select-CurrentVersion error by locking to 0.4.2 (#5093) Signed-off-by: Peter Zhu --- docker/ci/config/windows-setup.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/ci/config/windows-setup.ps1 b/docker/ci/config/windows-setup.ps1 index 38e35461a4..af14fa8f14 100644 --- a/docker/ci/config/windows-setup.ps1 +++ b/docker/ci/config/windows-setup.ps1 @@ -11,7 +11,12 @@ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Install Scoop as Administrator User here -iex "& {$(irm get.scoop.sh)} -RunAsAdmin" +# Scoop version >= 0.5.0 has error with Select-CurrentVersion function +# They have not fix the issue and will error out on Windows ltsc2019 +# https://github.com/ScoopInstaller/Scoop/issues/6180 +# A temp solution is to hardcode the scoop version to 0.4.2 +# iex "& {$(irm get.scoop.sh)} -RunAsAdmin" +iex "& {$(irm https://raw.githubusercontent.com/peterzhuamazon/scoop-Install/refs/heads/stable/install.ps1)} -RunAsAdmin" # Disable "current" alias directory as it is not preserved after AMI creation # Use static path in environment variable