File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -40,22 +40,25 @@ jobs:
4040 $scopes = 'local', 'global', 'system'
4141 $scopes | ForEach-Object {
4242 LogGroup "GitConfig - $_" {
43- $configList = git config --$_ --list 2>&1
43+ $Scope = $_
44+ $configList = git config --$Scope --list 2>&1
4445 if ($LASTEXITCODE -ne 0) {
4546 $global:LASTEXITCODE = 0
4647 $configList = $null
4748 } else {
4849 $config = @()
4950 $configList = $configList | Sort-Object
5051 $configList | ForEach-Object {
51- $name, $value = $_ -split '='
52+ $name, $value = $_ -split '=', 2
53+ if ($value -match '(?i)AUTHORIZATION:\s*(?<scheme>[^\s]+)\s+(?<token>.*)') {
54+ $secret = $matches['token']
55+ Add-GitHubMask -Value $secret
56+ }
5257 $config += @{
53- $name = $value
58+ ( $name.Trim()) = ( $value.Trim())
5459 }
5560 }
56- $config | ForEach-Object {
57- $_.GetEnumerator()
58- } | Format-List
61+ $config
5962 }
6063 }
6164 }
You can’t perform that action at this time.
0 commit comments