diff --git a/scripts/Common/Software/git/Manage.ps1 b/scripts/Common/Software/git/Manage.ps1 index e815f5dd..c9b605e2 100644 --- a/scripts/Common/Software/git/Manage.ps1 +++ b/scripts/Common/Software/git/Manage.ps1 @@ -92,8 +92,10 @@ $null = New-Module { # Aliases [PSCustomObject] $aliases = Get-GitConfig "aliases"; - foreach ($alias in ($aliases | Get-Member -MemberType Properties)) { - Set-GitConfig "alias.$($alias.Name)" $aliases.$($alias.Name); + if ($aliases) { + foreach ($alias in ($aliases | Get-Member -MemberType Properties)) { + Set-GitConfig "alias.$($alias.Name)" $aliases.$($alias.Name); + } } };