logging die and warn messages

- change a few important die()s to _die()s
  - setup SIGs for both die and warn so any others will get caught
This commit is contained in:
Sitaram Chamarty 2012-04-16 17:14:03 +05:30
parent 67327ebfb4
commit 581e79d745
6 changed files with 11 additions and 7 deletions

View file

@ -25,9 +25,9 @@ my $repo = shift;
my $on = ( shift eq 'on' );
if ( $repo eq '@all' ) {
die "you are not authorized\n" if $ENV{GL_USER} and not is_admin();
_die "you are not authorized" if $ENV{GL_USER} and not is_admin();
} else {
die "you are not authorized\n" if $ENV{GL_USER} and not owns($repo);
_die "you are not authorized" if $ENV{GL_USER} and not owns($repo);
}
my $msg = join( " ", @ARGV );