Set user info during git setup

This commit is contained in:
Manuel Thalmann 2024-08-23 02:01:16 +02:00
parent b0fb27f638
commit b73b4522b2

View file

@ -59,6 +59,19 @@ $null = New-Module {
}
}
if ($User) {
$displayName = & $getConfig "displayName";
$mailAddress = & $getConfig "mailAddress";
if ($displayName) {
Set-GitConfig "user.name" $displayName;
}
if ($mailAddress) {
Set-GitConfig "user.email" $mailAddress;
}
}
# Git Flow
. {
$dir = New-TemporaryDirectory;