@@ -560,20 +560,19 @@ def update_submodules(self):
560560 self .get_toml ('submodules' ) == "false" or \
561561 self .get_mk ('CFG_DISABLE_MANAGE_SUBMODULES' ) == "1" :
562562 return
563-
564563 print ('Updating submodules' )
564+ default_encoding = sys .getdefaultencoding ()
565565 self .run (["git" , "submodule" , "-q" , "sync" ], cwd = self .rust_root )
566- # FIXME: nobody does, but this won't work well with whitespace in
567- # submodule path
568- submodules = [s .split ()[1 ] for s in subprocess .check_output (
569- ["git" , "config" , "--file" , os .path .join (
570- self .rust_root , ".gitmodules" ), "--get-regexp" , "path" ]).splitlines ()]
566+ submodules = [s .split (' ' , 1 )[1 ] for s in subprocess .check_output (
567+ ["git" , "config" , "--file" , os .path .join (self .rust_root , ".gitmodules" ),
568+ "--get-regexp" , "path" ]
569+ ).decode (default_encoding ).splitlines ()]
571570 submodules = [module for module in submodules
572- if not ((module .endswith (b "llvm" ) and
573- (self .get_toml ('llvm-config' ) or self .get_mk ('CFG_LLVM_ROOT' ))) or
574- (module .endswith (b "jemalloc" ) and
575- (self .get_toml ('jemalloc' ) or self .get_mk ('CFG_JEMALLOC_ROOT' ))))
576- ]
571+ if not ((module .endswith ("llvm" ) and
572+ (self .get_toml ('llvm-config' ) or self .get_mk ('CFG_LLVM_ROOT' ))) or
573+ (module .endswith ("jemalloc" ) and
574+ (self .get_toml ('jemalloc' ) or self .get_mk ('CFG_JEMALLOC_ROOT' ))))
575+ ]
577576 self .run (["git" , "submodule" , "update" ,
578577 "--init" ] + submodules , cwd = self .rust_root )
579578 self .run (["git" , "submodule" , "-q" , "foreach" , "git" ,
0 commit comments