diff --git a/src/gl-auth-command b/src/gl-auth-command index 012398f..2ea2dbb 100755 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@ -29,14 +29,8 @@ our $REPO_BASE; our %repos; my $glrc = $ENV{HOME} . "/.gitolite.rc"; -unless (my $ret = do $glrc) -{ - die "parse $glrc failed: $@" if $@; - die "couldn't do $glrc: $!" unless defined $ret; - die "couldn't run $glrc" unless $ret; -} - -die "couldnt do perms file" unless (my $ret = do $GL_CONF_COMPILED); +die "parse $glrc failed: " . ($! or $@) unless do $glrc; +die "parse $GL_CONF_COMPILED failed: " . ($! or $@) unless do $GL_CONF_COMPILED; # ---------------------------------------------------------------------------- # definitions specific to this program diff --git a/src/gl-compile-conf b/src/gl-compile-conf index e702a1d..8454eb4 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -48,12 +48,7 @@ our $GL_CONF_COMPILED; our $REPO_BASE; my $glrc = $ENV{HOME} . "/.gitolite.rc"; -unless (my $ret = do $glrc) -{ - die "parse $glrc failed: $@" if $@; - die "couldn't do $glrc: $!" unless defined $ret; - die "couldn't run $glrc" unless $ret; -} +die "parse $glrc failed: " . ($! or $@) unless do $glrc; # ---------------------------------------------------------------------------- # definitions specific to this program diff --git a/src/install.pl b/src/install.pl index 73fb118..6dec899 100755 --- a/src/install.pl +++ b/src/install.pl @@ -28,12 +28,7 @@ unless (-f $glrc) { } # ok now $glrc exists; read it to get the other paths -unless (my $ret = do $glrc) -{ - die "parse $glrc failed: $@" if $@; - die "couldn't do $glrc: $!" unless defined $ret; - die "couldn't run $glrc" unless $ret; -} +die "parse $glrc failed: " . ($! or $@) unless do $glrc; # mkdir $REPO_BASE, $GL_ADMINDIR if they don't already exist wrap_mkdir( $REPO_BASE =~ m(^/) ? $REPO_BASE : "$ENV{HOME}/$REPO_BASE" ); diff --git a/src/update-hook.pl b/src/update-hook.pl index 4a51d76..526cf1d 100755 --- a/src/update-hook.pl +++ b/src/update-hook.pl @@ -31,14 +31,8 @@ our $PERSONAL; our %repos; my $glrc = $ENV{HOME} . "/.gitolite.rc"; -unless (my $ret = do $glrc) -{ - die "parse $glrc failed: $@" if $@; - die "couldn't do $glrc: $!" unless defined $ret; - die "couldn't run $glrc" unless $ret; -} - -die "couldnt do perms file" unless (my $ret = do $GL_CONF_COMPILED); +die "parse $glrc failed: " . ($! or $@) unless do $glrc; +die "parse $GL_CONF_COMPILED failed: " . ($! or $@) unless do $GL_CONF_COMPILED; # ---------------------------------------------------------------------------- # start...