File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1058,20 +1058,28 @@ Executed at: {executed_at}"#,
10581058 CommandOutput :: did_not_start ( stdout, stderr)
10591059 }
10601060 } ;
1061+
1062+ let fail = |message : & str | {
1063+ if self . is_verbose ( ) {
1064+ println ! ( "{message}" ) ;
1065+ } else {
1066+ println ! ( "Command has failed. Rerun with -v to see more details." ) ;
1067+ }
1068+ exit ! ( 1 ) ;
1069+ } ;
1070+
10611071 if !output. is_success ( ) {
10621072 match command. failure_behavior {
10631073 BehaviorOnFailure :: DelayFail => {
10641074 if self . fail_fast {
1065- println ! ( "{message}" ) ;
1066- exit ! ( 1 ) ;
1075+ fail ( & message) ;
10671076 }
10681077
10691078 let mut failures = self . delayed_failures . borrow_mut ( ) ;
10701079 failures. push ( message) ;
10711080 }
10721081 BehaviorOnFailure :: Exit => {
1073- println ! ( "{message}" ) ;
1074- exit ! ( 1 ) ;
1082+ fail ( & message) ;
10751083 }
10761084 BehaviorOnFailure :: Ignore => {
10771085 // If failures are allowed, either the error has been printed already
You can’t perform that action at this time.
0 commit comments