File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -302,13 +302,12 @@ impl StderrThread {
302302 if !capture {
303303 info ! ( "{line}" ) ;
304304 } else {
305+ if !output. is_empty ( ) {
306+ output. push ( '\n' ) ;
307+ }
305308 output. push_str ( & line) ;
306- output. push ( '\n' ) ;
307309 }
308310 } ) ;
309- if output. ends_with ( '\n' ) {
310- output. pop ( ) ;
311- }
312311 output
313312 } ) ;
314313 Self {
@@ -327,13 +326,11 @@ impl StderrThread {
327326 if let Some ( thread) = self . thread . take ( ) {
328327 match thread. join ( ) {
329328 Err ( e) => {
329+ let cmd = & self . cmd ;
330330 return Err ( Error :: new (
331331 ErrorKind :: Other ,
332- format ! (
333- "Running [{}] stderr thread joined with error: {e:?}" ,
334- self . cmd
335- ) ,
336- ) )
332+ format ! ( "Running [{cmd}] stderr thread joined with error: {e:?}" , ) ,
333+ ) ) ;
337334 }
338335 Ok ( output) => return Ok ( output) ,
339336 }
You can’t perform that action at this time.
0 commit comments