File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use std:: env;
4
4
use std:: ffi:: OsStr ;
5
+ use std:: fmt:: Write ;
5
6
use std:: path:: PathBuf ;
6
7
use std:: process:: { self , Command } ;
7
8
@@ -140,12 +141,20 @@ pub fn setup(
140
141
// Do the build.
141
142
if print_sysroot {
142
143
// Be silent.
143
- } else if only_setup {
144
- // We want to be explicit.
145
- eprintln ! ( "Preparing a sysroot for Miri (target: {target})..." ) ;
146
144
} else {
147
- // We want to be quiet, but still let the user know that something is happening.
148
- eprint ! ( "Preparing a sysroot for Miri (target: {target})... " ) ;
145
+ let mut msg = String :: new ( ) ;
146
+ write ! ( msg, "Preparing a sysroot for Miri (target: {target})" ) . unwrap ( ) ;
147
+ if verbose > 0 {
148
+ write ! ( msg, " in {}" , sysroot_dir. display( ) ) . unwrap ( ) ;
149
+ }
150
+ write ! ( msg, "..." ) . unwrap ( ) ;
151
+ if only_setup {
152
+ // We want to be explicit.
153
+ eprintln ! ( "{msg}" ) ;
154
+ } else {
155
+ // We want to be quiet, but still let the user know that something is happening.
156
+ eprint ! ( "{msg} " ) ;
157
+ }
149
158
}
150
159
SysrootBuilder :: new ( & sysroot_dir, target)
151
160
. build_mode ( BuildMode :: Check )
You can’t perform that action at this time.
0 commit comments