From 49d132a969cb1148e289af6bb5633d193263fd19 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 1 May 2012 13:12:10 +0530 Subject: [PATCH] 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. --- src/commands/info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/info b/src/commands/info index 0b789bd26..c4f5d6c3d 100755 --- a/src/commands/info +++ b/src/commands/info @@ -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 {