[Rt-commit] rt branch, 4.2/cli-gecos-error, created. rt-4.2.3-87-gdc2945e

Alex Vandiver alexmv at bestpractical.com
Wed Apr 16 17:35:44 EDT 2014


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

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

    Failure to find a user is an error; provide a message that points to the GECOS field

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 dea320ec3f0dc63399f86c86335289639becec1e
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 dc2945eb691589050488856bfbd0d4c31260fbca
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 18f2790..741e8af 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