File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff 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
304315function Invoke-GitLog {
You can’t perform that action at this time.
0 commit comments