From e6ffc49059d58dc44162b321c8d7338dfcc6c82b Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 16 Oct 2023 08:59:01 +0200 Subject: [PATCH] Update update_script.py --- update_script.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update_script.py b/update_script.py index 1d6761b3..b29d4376 100644 --- a/update_script.py +++ b/update_script.py @@ -15,6 +15,10 @@ def run_git_pull(): print("Updating submodules") try: repo.git.submodule('update', '--init', '--recursive') + # Checkout the main branch on each submodule + for submodule in repo.submodules: + submodule_repo = submodule.module() + submodule_repo.git.checkout('main') except: print("Couldn't update submodules") return True