File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 77//! relevant to command execution in the bootstrap process. This includes settings such as
88//! dry-run mode, verbosity level, and failure behavior.
99
10+ use std:: backtrace:: { Backtrace , BacktraceStatus } ;
1011use std:: collections:: HashMap ;
1112use std:: ffi:: { OsStr , OsString } ;
1213use std:: fmt:: { Debug , Formatter } ;
@@ -930,6 +931,16 @@ Executed at: {executed_at}"#,
930931 if stderr. captures ( ) {
931932 writeln ! ( error_message, "\n --- STDERR vvv\n {}" , output. stderr( ) . trim( ) ) . unwrap ( ) ;
932933 }
934+ let backtrace = if exec_ctx. verbosity > 1 {
935+ Backtrace :: force_capture ( )
936+ } else if matches ! ( command. failure_behavior, BehaviorOnFailure :: Ignore ) {
937+ Backtrace :: disabled ( )
938+ } else {
939+ Backtrace :: capture ( )
940+ } ;
941+ if matches ! ( backtrace. status( ) , BacktraceStatus :: Captured ) {
942+ writeln ! ( error_message, "\n --- BACKTRACE vvv\n {backtrace}" ) . unwrap ( ) ;
943+ }
933944
934945 match command. failure_behavior {
935946 BehaviorOnFailure :: DelayFail => {
You can’t perform that action at this time.
0 commit comments