From e3079f0476cf3a5d8a0120c86e136e9f2c272c09 Mon Sep 17 00:00:00 2001 From: AlexanderGitin <102294679+AlexanderGitin@users.noreply.github.com> Date: Thu, 19 May 2022 11:07:43 +0300 Subject: [PATCH] [Windows] Add safe directory to gitconfig (#5453) --- images/win/scripts/Installers/Install-Git.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Git.ps1 b/images/win/scripts/Installers/Install-Git.ps1 index 839f3751d..e2d3cd435 100644 --- a/images/win/scripts/Installers/Install-Git.ps1 +++ b/images/win/scripts/Installers/Install-Git.ps1 @@ -2,10 +2,14 @@ ## File: Install-Git.ps1 ## Desc: Install Git for Windows ################################################################################ +Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" # Install git -# Temporary hardcode version 2.35.1 due to the issue with the actions\checkout https://github.com/actions/checkout/issues/760 -Choco-Install -PackageName git -ArgumentList '--version', "2.35.1.2", '--installargs="/VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /o:PathOption=CmdTools /o:BashTerminalOption=ConHost /o:EnableSymlinks=Enabled /COMPONENTS=gitlfs"' +Choco-Install -PackageName git -ArgumentList '--installargs="/VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /o:PathOption=CmdTools /o:BashTerminalOption=ConHost /o:EnableSymlinks=Enabled /COMPONENTS=gitlfs"' + +Update-SessionEnvironment + +git config --system --add safe.directory "*" # Install hub Choco-Install -PackageName hub