11use crate :: rustc_info:: get_rustc_path;
2- use crate :: utils:: { cargo_install, git_clone, run_command, walk_dir} ;
2+ use crate :: utils:: { cargo_install, git_clone, run_command, run_command_with_output , walk_dir} ;
33
44use std:: fs;
55use std:: path:: Path ;
@@ -37,9 +37,9 @@ fn prepare_libcore() -> Result<(), String> {
3737 run_command ( & [ & "cp" , & "-r" , & rustlib_dir, & sysroot_library_dir] , None ) ?;
3838
3939 println ! ( "[GIT] init (cwd): `{}`" , sysroot_dir. display( ) ) ;
40- run_command ( & [ & "git" , & "init" ] , Some ( & sysroot_dir) ) ?;
40+ run_command_with_output ( & [ & "git" , & "init" ] , Some ( & sysroot_dir) ) ?;
4141 println ! ( "[GIT] add (cwd): `{}`" , sysroot_dir. display( ) ) ;
42- run_command ( & [ & "git" , & "add" , & "." ] , Some ( & sysroot_dir) ) ?;
42+ run_command_with_output ( & [ & "git" , & "add" , & "." ] , Some ( & sysroot_dir) ) ?;
4343 println ! ( "[GIT] commit (cwd): `{}`" , sysroot_dir. display( ) ) ;
4444
4545 // This is needed on systems where nothing is configured.
@@ -54,9 +54,9 @@ fn prepare_libcore() -> Result<(), String> {
5454 walk_dir ( "patches" , |_| Ok ( ( ) ) , |file_path : & Path | {
5555 println ! ( "[GIT] apply `{}`" , file_path. display( ) ) ;
5656 let path = Path :: new ( "../.." ) . join ( file_path) ;
57- run_command ( & [ & "git" , & "apply" , & path] , Some ( & sysroot_dir) ) ?;
58- run_command ( & [ & "git" , & "add" , & "-A" ] , Some ( & sysroot_dir) ) ?;
59- run_command (
57+ run_command_with_output ( & [ & "git" , & "apply" , & path] , Some ( & sysroot_dir) ) ?;
58+ run_command_with_output ( & [ & "git" , & "add" , & "-A" ] , Some ( & sysroot_dir) ) ?;
59+ run_command_with_output (
6060 & [ & "git" , & "commit" , & "--no-gpg-sign" , & "-m" , & format ! ( "Patch {}" , path. display( ) ) ] ,
6161 Some ( & sysroot_dir) ,
6262 ) ?;
0 commit comments