From 289366ebdf34ada9185240cd05e99ad3adab666c Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Mon, 22 Oct 2012 11:43:33 -0600 Subject: [PATCH] Exit 1 on option errors. --- lib/OptionParser.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OptionParser.pm b/lib/OptionParser.pm index b9423602..c61ab321 100644 --- a/lib/OptionParser.pm +++ b/lib/OptionParser.pm @@ -669,7 +669,7 @@ sub get_opts { else { print "Error parsing version. See the VERSION section of the tool's documentation.\n"; } - exit 0; + exit 1; } if ( @ARGV && $self->{strict} ) { @@ -988,7 +988,7 @@ sub usage_or_errors { } elsif ( scalar @{$self->{errors}} ) { print $self->print_errors() or die "Cannot print errors: $OS_ERROR"; - exit 0 unless $return; + exit 1 unless $return; } return;