[Rt-commit] rt branch, 4.2/cli-gecos-error, created. rt-4.2.6-13-gc2b7fa5

Alex Vandiver alexmv at bestpractical.com
Thu Jul 17 11:20:59 EDT 2014


The branch, 4.2/cli-gecos-error has been created
        at  c2b7fa54b5a8b810582fec73cab7220abd0ac32c (commit)

- Log -----------------------------------------------------------------
commit 0cb59475d5df059990122ca70b03005bc205075e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Apr 16 17:34:22 2014 -0400

    Failure to find a user is an error; explicitly mention GECOS
    
    As "GECOS" is what RT calls the field in a number of places, provide
    that name in the error message.

diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 8f162c2..21a2b04 100644
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -135,7 +135,7 @@ sub GetCurrentUser  {
     $CurrentUser->LoadByGecos($Gecos);
     
     unless ($CurrentUser->Id) {
-        $RT::Logger->debug("No user with a unix login of '$Gecos' was found. ");
+        $RT::Logger->error("No user with a GECOS (unix login) of '$Gecos' was found.");
     }
 
     return($CurrentUser);

commit eb81cdf413af66ab931e06b2b8d281b62367de24
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Apr 16 17:35:16 2014 -0400

    Trailing whitespace cleanup

diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 21a2b04..251b11c 100644
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -121,11 +121,11 @@ loaded with that user.  if the current user isn't found, returns a copy of RT::N
 =cut
 
 sub GetCurrentUser  {
-    
+
     require RT::CurrentUser;
-    
+
     #Instantiate a user object
-    
+
     my $Gecos= (getpwuid($<))[0];
 
     #If the current user is 0, then RT will assume that the User object
@@ -133,7 +133,7 @@ sub GetCurrentUser  {
 
     $CurrentUser = RT::CurrentUser->new();
     $CurrentUser->LoadByGecos($Gecos);
-    
+
     unless ($CurrentUser->Id) {
         $RT::Logger->error("No user with a GECOS (unix login) of '$Gecos' was found.");
     }

commit c2b7fa54b5a8b810582fec73cab7220abd0ac32c
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Apr 16 17:35:31 2014 -0400

    Add a trailing newline to the rt-crontool error message, for legibility

diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 668b325..4279c80 100644
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -113,7 +113,7 @@ my $CurrentUser = GetCurrentUser();
 help() if $help;
 
 unless ( $CurrentUser->Id ) {
-    print loc("No RT user found. Please consult your RT administrator.");
+    print loc("No RT user found. Please consult your RT administrator.") . "\n";
     exit(1);
 }
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list