From 5657dec7af3b55531d12f753cbd04370357941de Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:31:56 +0200 Subject: [PATCH] [Windows|Ubuntu] Remove obsolete workarounds (#7431) --- .../linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 5 +---- images/linux/scripts/base/apt.sh | 6 +----- images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 3f7ff567..05253245 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -182,10 +182,7 @@ function Get-NvmVersion { } function Get-PackerVersion { - # Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855 - $result = (Get-CommandResult "packer --version").Output - $packerVersion = [regex]::matches($result, "(\d+.){2}\d+").Value - return $packerVersion + return "Packer $(packer --version)" } function Get-PhantomJSVersion { diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index 2ddac1af..f50866b5 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -31,11 +31,7 @@ EOF # Uninstall unattended-upgrades apt-get purge unattended-upgrades -# Need to limit arch for default apt repos due to -# https://github.com/actions/runner-images/issues/1961 -sed -i'' -E 's/^deb http:\/\/(azure.archive|security).ubuntu.com/deb [arch=amd64,i386] http:\/\/\1.ubuntu.com/' /etc/apt/sources.list - -echo 'APT sources limited to the actual architectures' +echo 'APT sources' cat /etc/apt/sources.list apt-get update diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index b8837403..71437bbe 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -142,10 +142,7 @@ function Get-OpenSSLVersion { } function Get-PackerVersion { - # Packer 1.7.1 has a bug and outputs version to stderr instead of stdout https://github.com/hashicorp/packer/issues/10855 - ($(cmd /c "packer --version 2>&1") | Out-String) -match "(?(\d+.){2}\d+)" | Out-Null - $packerVersion = $Matches.Version - return $packerVersion + return "Packer $(packer --version)" } function Get-ParcelVersion {