@@ -116,8 +116,10 @@ def check_folder(folder: str, file: str) -> bool:
116
116
if missing_submodules :
117
117
logger .warning ("Some required submodules are missing. Updating submodules..." )
118
118
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
+ )
121
123
except subprocess .CalledProcessError as e :
122
124
logger .error (f"Error updating submodules: { e } " )
123
125
exit (1 )
@@ -126,13 +128,10 @@ def check_folder(folder: str, file: str) -> bool:
126
128
for path , file in missing_submodules .items ():
127
129
if not check_folder (path , file ):
128
130
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
+ )
130
134
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" ])
136
135
logger .info ("All required submodules are present." )
137
136
138
137
0 commit comments