diff --git a/images/win/scripts/Installers/Install-Git.ps1 b/images/win/scripts/Installers/Install-Git.ps1 index 27a61969..e8954ffe 100644 --- a/images/win/scripts/Installers/Install-Git.ps1 +++ b/images/win/scripts/Installers/Install-Git.ps1 @@ -31,7 +31,8 @@ Install-Binary -Url $downloadUrl ` "/o:EnableSymlinks=Enabled", ` "/COMPONENTS=gitlfs") -Choco-Install -PackageName hub +# Install hub with --ignore-dependencies option to prevent the installation of the git package. See details in https://github.com/actions/virtual-environments/issues/2375 +Choco-Install -PackageName hub -ArgumentList "--ignore-dependencies" # Disable GCM machine-wide [Environment]::SetEnvironmentVariable("GCM_INTERACTIVE", "Never", [System.EnvironmentVariableTarget]::Machine)