Skip to content

Commit d3f2a6d

Browse files
🩹 [Patch]: Update Action-Test workflow to handle Git config command errors and sort output
1 parent d9a7235 commit d3f2a6d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎.github/workflows/Action-Test.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ jobs:
4141
$scopes | ForEach-Object {
4242
LogGroup "GitConfig - $_" {
4343
$configList = git config --$_ --list 2>&1
44+
if ($LASTEXITCODE -ne 0) {
45+
$global:LASTEXITCODE = 0
46+
$configList = $null
47+
}
48+
$configList = $configList | Sort-Object
4449
$configList
45-
$LASTEXITCODE
4650
}
4751
}

0 commit comments

Comments
 (0)