File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -317,24 +317,16 @@ fn list_impl(matches: &clap::ArgMatches) {
317317 issues. truncate ( str:: parse ( number) . unwrap_or_abort ( ) ) ;
318318 }
319319
320- // spawn a pager
321- let mut pager = system:: programs:: pager ( repo. config ( ) . unwrap_or_abort ( ) )
322- . unwrap_or_abort ( ) ;
323-
324- issues
320+ // present the list to the user
321+ let result = issues
325322 . into_iter ( )
326323 . map ( |issue| issue. initial_message ( ) )
327324 . abort_on_err ( )
328325 . flat_map ( |initial| formatter. iter ( ) . formatted_lines ( initial) )
329326 . abort_on_err ( )
330- . write_lines ( pager . stdin . as_mut ( ) . unwrap ( ) )
327+ . pipe_lines ( repo . pager ( ) )
331328 . unwrap_or_abort ( ) ;
332-
333- // don't trash the shell by exitting with a child still printing to it
334- let result = pager. wait ( ) . unwrap_or_abort ( ) ;
335- if !result. success ( ) {
336- std:: process:: exit ( result. code ( ) . unwrap_or ( 1 ) ) ;
337- }
329+ std:: process:: exit ( result) ;
338330}
339331
340332
You can’t perform that action at this time.
0 commit comments