From 336cf2a3c54f569131835da45e567f51ddfc4dd8 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 1 Jun 2020 13:28:03 -0700 Subject: [PATCH] [build] 'make reset' target will continue recursive operations if any fail (#4675) This change allows the recursive `git clean` and `git reset` commands to continue even if they encounter an error in one of the submodules. Previously, if an error was encountered, the operation would terminate with a message similar to the following: Stopping at 'src/sonic-mgmt-framework'; script returned non-zero status. --- Makefile.work | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.work b/Makefile.work index ca98222c1699..11e79f6b81ab 100644 --- a/Makefile.work +++ b/Makefile.work @@ -283,8 +283,8 @@ reset : fi git clean -xfdf; git reset --hard; - git submodule foreach --recursive git clean -xfdf; - git submodule foreach --recursive git reset --hard; + git submodule foreach --recursive 'git clean -xfdf || true'; + git submodule foreach --recursive 'git reset --hard || true'; git submodule update --init --recursive; echo "Reset complete!"; else