1
1
use crate :: Build ;
2
2
use build_helper:: drop_bomb:: DropBomb ;
3
3
use std:: ffi:: OsStr ;
4
+ use std:: fmt:: { Debug , Formatter } ;
4
5
use std:: path:: Path ;
5
6
use std:: process:: { Command , CommandArgs , CommandEnvs , ExitStatus , Output , Stdio } ;
6
7
@@ -54,7 +55,6 @@ impl OutputMode {
54
55
///
55
56
/// [allow_failure]: BootstrapCommand::allow_failure
56
57
/// [delay_failure]: BootstrapCommand::delay_failure
57
- #[ derive( Debug ) ]
58
58
pub struct BootstrapCommand {
59
59
command : Command ,
60
60
pub failure_behavior : BehaviorOnFailure ,
@@ -147,6 +147,7 @@ impl BootstrapCommand {
147
147
}
148
148
149
149
/// Run the command, returning its output.
150
+ #[ track_caller]
150
151
pub fn run ( & mut self , builder : & Build ) -> CommandOutput {
151
152
builder. run ( self )
152
153
}
@@ -172,6 +173,17 @@ impl BootstrapCommand {
172
173
}
173
174
}
174
175
176
+ impl Debug for BootstrapCommand {
177
+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
178
+ write ! ( f, "{:?}" , self . command) ?;
179
+ write ! (
180
+ f,
181
+ " (failure_mode={:?}, stdout_mode={:?}, stderr_mode={:?})" ,
182
+ self . failure_behavior, self . stdout, self . stderr
183
+ )
184
+ }
185
+ }
186
+
175
187
impl From < Command > for BootstrapCommand {
176
188
#[ track_caller]
177
189
fn from ( command : Command ) -> Self {
0 commit comments