From fefaa9b9f60c187b5ed63d8771bcdc43fad683b8 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Fri, 19 Jun 2015 12:22:01 -0400 Subject: yelp-check: Fix pipe flow for license Getting return values for commands in a pipeline is hard. I did it wrong. I'm giving up for now for license, since error exits aren't normal for the license subcommand. --- tools/yelp-check.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/yelp-check.in b/tools/yelp-check.in index 05de8fc..ef2fe48 100755 --- a/tools/yelp-check.in +++ b/tools/yelp-check.in @@ -735,13 +735,12 @@ yelp_license () { fi check_db= check_page=yelp_license_page - yelp_check_iter_args $@ || exit 1 | \ - if [ "x$check_totals" = "x1" ]; then + if [ "x$check_totals" = "x1" ]; then + yelp_check_iter_args $@ | \ sort | uniq -c | sed -e 's/^ *//' | awk '{print $2 ": " $1}' - else - sort - fi - exit $yelp_check_retval + else + yelp_check_iter_args $@ | sort + fi } yelp_status () { -- cgit v1.2.1