1
1
use 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} ;
3
3
4
4
use std:: fs;
5
5
use std:: path:: Path ;
@@ -37,9 +37,9 @@ fn prepare_libcore() -> Result<(), String> {
37
37
run_command ( & [ & "cp" , & "-r" , & rustlib_dir, & sysroot_library_dir] , None ) ?;
38
38
39
39
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) ) ?;
41
41
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) ) ?;
43
43
println ! ( "[GIT] commit (cwd): `{}`" , sysroot_dir. display( ) ) ;
44
44
45
45
// This is needed on systems where nothing is configured.
@@ -54,9 +54,9 @@ fn prepare_libcore() -> Result<(), String> {
54
54
walk_dir ( "patches" , |_| Ok ( ( ) ) , |file_path : & Path | {
55
55
println ! ( "[GIT] apply `{}`" , file_path. display( ) ) ;
56
56
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 (
60
60
& [ & "git" , & "commit" , & "--no-gpg-sign" , & "-m" , & format ! ( "Patch {}" , path. display( ) ) ] ,
61
61
Some ( & sysroot_dir) ,
62
62
) ?;
0 commit comments