refex-expr: die when admin forgets to add the required line to the rc

redis
gitolite tester 2012-11-12 11:25:23 +05:30 committed by Sitaram Chamarty
parent 16f2d9b879
commit 57760d7e1b
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,8 @@ use strict;
use warnings;
my $rule = $ARGV[7];
die "\n\nFATAL: GL_REFEX_EXPR_ doesn't exist\n(your admin probably forgot the rc file change needed for this to work)\n\n"
unless exists $ENV{"GL_REFEX_EXPR_" . $rule};
my $res = $ENV{"GL_REFEX_EXPR_" . $rule} || 0;
print "$ARGV[6] ($res)\n" if $res;