From 9f764f74298ae97cc4bb2300b400442dc6f5fb4f Mon Sep 17 00:00:00 2001 From: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com> Date: Tue, 26 Sep 2023 09:30:27 +0200 Subject: [PATCH] [Windows] Remove hub utility (#8365) --- images/win/scripts/Installers/Install-Git.ps1 | 5 ----- .../win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 1 - images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 6 ------ images/win/scripts/Tests/CLI.Tools.Tests.ps1 | 6 ------ 4 files changed, 18 deletions(-) diff --git a/images/win/scripts/Installers/Install-Git.ps1 b/images/win/scripts/Installers/Install-Git.ps1 index fdada8836..8219f6dec 100644 --- a/images/win/scripts/Installers/Install-Git.ps1 +++ b/images/win/scripts/Installers/Install-Git.ps1 @@ -35,10 +35,6 @@ Update-SessionEnvironment git config --system --add safe.directory "*" -# Install hub with --ignore-dependencies option to prevent the installation of the git package. -# See details in https://github.com/actions/runner-images/issues/2375 -Choco-Install -PackageName hub -ArgumentList "--ignore-dependencies" - # Disable GCM machine-wide [Environment]::SetEnvironmentVariable("GCM_INTERACTIVE", "Never", [System.EnvironmentVariableTarget]::Machine) @@ -50,4 +46,3 @@ ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> "C:\Program Files\Git\etc\ssh\ssh ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts" Invoke-PesterTests -TestFile "Git" -Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index f76a96a8d..558542718 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -118,7 +118,6 @@ if (Test-IsWin19) { $cliTools.AddToolVersion("Cloud Foundry CLI", $(Get-CloudFoundryVersion)) } $cliTools.AddToolVersion("GitHub CLI", $(Get-GHVersion)) -$cliTools.AddToolVersion("Hub CLI", $(Get-HubVersion)) # Rust Tools Initialize-RustEnvironment diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 4952e90e8..86a645f8f 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -232,12 +232,6 @@ function Get-CloudFoundryVersion { return $cfVersion } -function Get-HubVersion { - ($(hub version) | Select-String -Pattern "hub version") -match "hub version (?\d+\.\d+\.\d+)" | Out-Null - $hubVersion = $Matches.Version - return $hubVersion -} - function Get-7zipVersion { (7z | Out-String) -match "7-Zip (?\d+\.\d+\.?\d*)" | Out-Null $version = $Matches.Version diff --git a/images/win/scripts/Tests/CLI.Tools.Tests.ps1 b/images/win/scripts/Tests/CLI.Tools.Tests.ps1 index cbf5d38c6..51e45b429 100644 --- a/images/win/scripts/Tests/CLI.Tools.Tests.ps1 +++ b/images/win/scripts/Tests/CLI.Tools.Tests.ps1 @@ -48,9 +48,3 @@ Describe "CloudFoundry CLI" -Skip:(Test-IsWin22) { "cf --version" | Should -ReturnZeroExitCode } } - -Describe "Hub CLI" { - It "hub is installed" { - "hub --version" | Should -ReturnZeroExitCode - } -} \ No newline at end of file