@@ -120,8 +120,10 @@ def check_folder(folder: str, file: str) -> bool:
120
120
if missing_submodules :
121
121
logger .warning ("Some required submodules are missing. Updating submodules..." )
122
122
try :
123
- subprocess .check_call (["git" , "submodule" , "sync" ])
124
- subprocess .check_call (["git" , "submodule" , "update" , "--init" ])
123
+ subprocess .check_call (["git" , "submodule" , "sync" , "--recursive" ])
124
+ subprocess .check_call (
125
+ ["git" , "submodule" , "update" , "--init" , "--recursive" ]
126
+ )
125
127
except subprocess .CalledProcessError as e :
126
128
logger .error (f"Error updating submodules: { e } " )
127
129
exit (1 )
@@ -130,13 +132,10 @@ def check_folder(folder: str, file: str) -> bool:
130
132
for path , file in missing_submodules .items ():
131
133
if not check_folder (path , file ):
132
134
logger .error (f"{ file } not found in { path } ." )
133
- logger .error ("Please run `git submodule update --init`." )
135
+ logger .error (
136
+ "Submodule update failed. Please run `git submodule update --init --recursive` manually."
137
+ )
134
138
exit (1 )
135
- # Go into tokenizers submodule and install its submodules
136
- tokenizers_path = get_required_submodule_paths ().get ("tokenizers" , None )
137
- if tokenizers_path :
138
- with pushd (tokenizers_path ):
139
- subprocess .check_call (["git" , "submodule" , "update" , "--init" ])
140
139
logger .info ("All required submodules are present." )
141
140
142
141
0 commit comments