Permalink
Browse files

minor fix to info command output under httpd...

when running under httpd, $ENV{USER} is not set, so we use a (hopefully
informative) default to print.

Thanks to Thomas Hager (duke at sigsegv dot at) for catching this.
  • Loading branch information...
1 parent c145528 commit 49d132a969cb1148e289af6bb5633d193263fd19 @sitaramc committed May 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/commands/info
View
@@ -52,7 +52,7 @@ sub print_version {
chomp( my $hn = `hostname -s 2>/dev/null || hostname` );
my $gv = substr( `git --version`, 12 );
$ENV{GL_USER} or _die "GL_USER not set";
- print "hello $ENV{GL_USER}, this is $ENV{USER}\@$hn running gitolite3 " . version() . " on git $gv\n";
+ print "hello $ENV{GL_USER}, this is " . ($ENV{USER} || "httpd") . "\@$hn running gitolite3 " . version() . " on git $gv\n";
}
sub print_patterns {

0 comments on commit 49d132a

Please sign in to comment.