Skip to content

Commit

Permalink
Don't exit() on print_version=> in run(), just return()
Browse files Browse the repository at this point in the history
  • Loading branch information
avar committed Jan 31, 2010
1 parent dc3f2ad commit b833085
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Hailo.pm
Expand Up @@ -298,7 +298,7 @@ sub run {

if ($self->print_version) {
print "hailo $VERSION\n";
exit;
return;
}

if (is_interactive() and
Expand Down
2 changes: 1 addition & 1 deletion t/usage/options.t
Expand Up @@ -12,7 +12,7 @@ $SIG{__WARN__} = sub { print STDERR @_ if $_[0] !~ m/for database handle being D
# --version
stdout_like(
sub {
exits_ok( sub { Hailo->new( print_version => 1)->run }, "exiting exits")
never_exits_ok( sub { Hailo->new( print_version => 1)->run }, "exiting exits")
},
qr/^hailo [0-9.]+$/,
"Hailo prints its version",
Expand Down

0 comments on commit b833085

Please sign in to comment.