File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -295,14 +295,14 @@ function Download-File {
295
295
}
296
296
297
297
function Write-GitConfigLocal {
298
- $gitUserName = $ ( Write-Host " Input Git Name: " - ForegroundColor Magenta - NoNewline; Read-Host )
299
- $gitUserMail = $ ( Write-Host " Input Git Email : " - ForegroundColor Magenta - NoNewline; Read-Host )
300
- $file = " $ Env: USERPROFILE \.gitconfig-local "
301
-
302
- Write-Output " [user]" | Out-File " $file " - Append
303
- Write-Output " $gitUserName " | Out-File " $file " - Append
304
- Write-Output " $gitUserMail " | Out-File " $file " - Append
305
- Write-PrettyInfo - Message " Git Email and Name set successfully in" - Info " $Env: USERPROFILE \.gitconfig-local "
298
+ param ([ string ] $Path )
299
+ $gitUserName = (gum input -- prompt = " Input Git Name : " -- placeholder = " Your Name " )
300
+ $gitUserMail = (gum input -- prompt = " Input Git Email: " -- placeholder = " youremail@domain.com " )
301
+
302
+ Write-Output " [user]" >> " $Path "
303
+ Write-Output " $gitUserName " >> " $Path "
304
+ Write-Output " $gitUserMail " >> " $Path "
305
+ Write-PrettyInfo - Message " Git Email and Name set successfully in" - Info " $Path "
306
306
}
307
307
308
308
# ##################################################################################################
Original file line number Diff line number Diff line change @@ -185,15 +185,15 @@ function Install {
185
185
Write-PrettyTitle " GIT SETUP"
186
186
if (Test-Path - Path " $env: USERPROFILE \.gitconfig-local" ) {
187
187
if ($ (Get-Content - Path " $env: USERPROFILE \.gitconfig-local" - Raw).Contains(" [user]" ) -eq $False ) {
188
- Write-GitConfigLocal
188
+ Write-GitConfigLocal - Path " $ env: USERPROFILE \.gitconfig-local "
189
189
}
190
190
else {
191
191
Write-PrettyInfo - Message " Git Email and Name already set in" - Info " $env: USERPROFILE \.gitconfig-local"
192
192
}
193
193
}
194
194
else {
195
195
New-Item - Path " $env: USERPROFILE \.gitconfig-local" - ItemType File | Out-Null
196
- Write-GitConfigLocal
196
+ Write-GitConfigLocal - Path " $ env: USERPROFILE \.gitconfig-local "
197
197
}
198
198
Set-Location " $PSScriptRoot "
199
199
git submodule update -- init -- recursive
You can’t perform that action at this time.
0 commit comments