Changeset 29095

Show
Ignore:
Timestamp:
12.06.2014 12:17:39 (5 years ago)
Author:
kjdon
Message:

new argument to print_txt_usage. Pass 1 if you don't want the output paged. We use this when there has been an error and we are outputing the options before quitting the import/build. If the output is paged, then the die doesn't end up getting through to the top level program. So for full-rebuild, if the import died because of a parsing error, if the output had been paged, then the import was stopped but the system return value was 0, and then it would go on to the next stage, trying to build. So now, if we are stopping because of an error, then don't page the output.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/printusage.pm

    r21341 r29095  
    172172    my $options = shift(@_); 
    173173    my $params = shift(@_); 
    174  
     174    my $no_pager = shift(@_); 
     175 
     176    unless ($no_pager) { 
    175177    # this causes us to automatically send output to a pager, if one is 
    176178    # set, AND our output is going to a terminal 
     
    189191    open(STDERR,">&STDOUT"); # so it's easier to pipe output 
    190192    } 
    191  
     193    } 
    192194 
    193195