@@ -1373,12 +1373,13 @@ impl Config {
1373
1373
}
1374
1374
1375
1375
println ! ( "Updating submodule {relative_path}" ) ;
1376
- self . check_run (
1377
- helpers:: git ( Some ( & self . src ) )
1378
- . run_always ( )
1379
- . args ( [ "submodule" , "-q" , "sync" ] )
1380
- . arg ( relative_path) ,
1381
- ) ;
1376
+
1377
+ helpers:: git ( Some ( & self . src ) )
1378
+ . allow_failure ( )
1379
+ . run_always ( )
1380
+ . args ( [ "submodule" , "-q" , "sync" ] )
1381
+ . arg ( relative_path)
1382
+ . run ( & self ) ;
1382
1383
1383
1384
// Try passing `--progress` to start, then run git again without if that fails.
1384
1385
let update = |progress : bool | {
@@ -1407,26 +1408,23 @@ impl Config {
1407
1408
git. arg ( relative_path) ;
1408
1409
git
1409
1410
} ;
1410
- if !self . check_run ( & mut update ( true ) ) {
1411
- self . check_run ( & mut update ( false ) ) ;
1411
+ if !update ( true ) . allow_failure ( ) . run ( & self ) {
1412
+ update ( false ) . allow_failure ( ) . run ( & self ) ;
1412
1413
}
1413
1414
1414
1415
// Save any local changes, but avoid running `git stash pop` if there are none (since it will exit with an error).
1415
1416
// diff-index reports the modifications through the exit status
1416
- let has_local_modifications = !self . check_run ( submodule_git ( ) . allow_failure ( ) . args ( [
1417
- "diff-index" ,
1418
- "--quiet" ,
1419
- "HEAD" ,
1420
- ] ) ) ;
1417
+ let has_local_modifications =
1418
+ !submodule_git ( ) . allow_failure ( ) . args ( [ "diff-index" , "--quiet" , "HEAD" ] ) . run ( & self ) ;
1421
1419
if has_local_modifications {
1422
- self . check_run ( submodule_git ( ) . args ( [ "stash" , "push" ] ) ) ;
1420
+ submodule_git ( ) . allow_failure ( ) . args ( [ "stash" , "push" ] ) . run ( & self ) ;
1423
1421
}
1424
1422
1425
- self . check_run ( submodule_git ( ) . args ( [ "reset" , "-q" , "--hard" ] ) ) ;
1426
- self . check_run ( submodule_git ( ) . args ( [ "clean" , "-qdfx" ] ) ) ;
1423
+ submodule_git ( ) . allow_failure ( ) . args ( [ "reset" , "-q" , "--hard" ] ) . run ( & self ) ;
1424
+ submodule_git ( ) . allow_failure ( ) . args ( [ "clean" , "-qdfx" ] ) . run ( & self ) ;
1427
1425
1428
1426
if has_local_modifications {
1429
- self . check_run ( submodule_git ( ) . args ( [ "stash" , "pop" ] ) ) ;
1427
+ submodule_git ( ) . allow_failure ( ) . args ( [ "stash" , "pop" ] ) . run ( & self ) ;
1430
1428
}
1431
1429
}
1432
1430
0 commit comments