Skip to content

Commit 2ea01fa

Browse files
committed
Log updating bucket name to help debugging when buckets have git conflicts
1 parent 859d1db commit 2ea01fa

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/core.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ function Invoke-Git {
280280
}
281281

282282
if([String]::IsNullOrEmpty($proxy) -or $proxy -eq 'none') {
283-
return & $git @ArgumentList
283+
$result = & $git @ArgumentList
284+
if ($LASTEXITCODE -ne 0) {
285+
Write-Warning "Git failed in $WorkingDirectory"
286+
}
287+
return $result
284288
}
285289

286290
if($ArgumentList -Match '\b(clone|checkout|pull|fetch|ls-remote)\b') {
@@ -295,10 +299,17 @@ function Invoke-Git {
295299
& $using:git @using:ArgumentList
296300
}
297301
$o = $j | Receive-Job -Wait -AutoRemoveJob
302+
if ($LASTEXITCODE -ne 0) {
303+
Write-Warning "Git job failed in $WorkingDirectory"
304+
}
298305
return $o
299306
}
300307

301-
return & $git @ArgumentList
308+
$result = & $git @ArgumentList
309+
if ($LASTEXITCODE -ne 0) {
310+
Write-Warning "Git failed in $WorkingDirectory"
311+
}
312+
return $result
302313
}
303314

304315
function Invoke-GitLog {

0 commit comments

Comments
 (0)