@@ -116,8 +116,10 @@ def check_folder(folder: str, file: str) -> bool:
116116 if missing_submodules :
117117 logger .warning ("Some required submodules are missing. Updating submodules..." )
118118 try :
119- subprocess .check_call (["git" , "submodule" , "sync" ])
120- subprocess .check_call (["git" , "submodule" , "update" , "--init" ])
119+ subprocess .check_call (["git" , "submodule" , "sync" , "--recursive" ])
120+ subprocess .check_call (
121+ ["git" , "submodule" , "update" , "--init" , "--recursive" ]
122+ )
121123 except subprocess .CalledProcessError as e :
122124 logger .error (f"Error updating submodules: { e } " )
123125 exit (1 )
@@ -126,13 +128,10 @@ def check_folder(folder: str, file: str) -> bool:
126128 for path , file in missing_submodules .items ():
127129 if not check_folder (path , file ):
128130 logger .error (f"{ file } not found in { path } ." )
129- logger .error ("Please run `git submodule update --init`." )
131+ logger .error (
132+ "Submodule update failed. Please run `git submodule update --init --recursive` manually."
133+ )
130134 exit (1 )
131- # Go into tokenizers submodule and install its submodules
132- tokenizers_path = get_required_submodule_paths ().get ("tokenizers" , None )
133- if tokenizers_path :
134- with pushd (tokenizers_path ):
135- subprocess .check_call (["git" , "submodule" , "update" , "--init" ])
136135 logger .info ("All required submodules are present." )
137136
138137
0 commit comments