[Windows] Add new git environment variable (#9898)

This commit is contained in:
Alexey-Ayupov
2024-05-20 16:44:16 +02:00
committed by GitHub
parent ee7edb4f80
commit 5113d251a8
2 changed files with 6 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ if ($LASTEXITCODE -ne 0) {
# Disable GCM machine-wide
[Environment]::SetEnvironmentVariable("GCM_INTERACTIVE", "Never", "Machine")
# Revert to the old behaviour and avoid the Git LFS problems (https://github.blog/2024-05-14-securing-git-addressing-5-new-vulnerabilities/)
[Environment]::SetEnvironmentVariable("GIT_CLONE_PROTECTION_ACTIVE", "false", "Machine")
# Add to PATH
Add-MachinePathItem "C:\Program Files\Git\bin"

View File

@@ -22,4 +22,8 @@ Describe "Git" {
It "GCM_INTERACTIVE environment variable should be equal Never" {
$env:GCM_INTERACTIVE | Should -BeExactly Never
}
It "GIT_CLONE_PROTECTION_ACTIVE environment variable should be equal false" {
$env:GIT_CLONE_PROTECTION_ACTIVE | Should -BeExactly false
}
}