Allow leaving aliases unspecified

This commit is contained in:
Manuel Thalmann 2024-08-23 01:52:25 +02:00
parent 7fc0a0235c
commit 5f9815d1d9

View file

@ -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);
}
}
};