[Windows] Add safe directory to gitconfig (#5453)

This commit is contained in:
AlexanderGitin
2022-05-19 11:07:43 +03:00
committed by GitHub
parent 9aa72c4482
commit e3079f0476

View File

@@ -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