[Bps-public-commit] Module-Install-RTx branch, rt-too-new-warn, created. 0.41-1-gd41642d

? sunnavy sunnavy at bestpractical.com
Wed Jul 8 16:42:56 EDT 2020


The branch, rt-too-new-warn has been created
        at  d41642d835f68522ad6f515903c484d9c12348f7 (commit)

- Log -----------------------------------------------------------------
commit d41642d835f68522ad6f515903c484d9c12348f7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 9 03:46:28 2020 +0800

    Make rt_too_new warn instead to not block installation
    
    E.g.
    
        rt_too_new('5.2.0');
    
    This usually doesn't mean the extension won't work with RT 5.2(since
    it's not released yet, we actually don't know if it will work or not for
    now). It's quite possible that current extension works fine with RT 5.2
    without any changes.
    
    Thus here we choose to warn that it's not tested yet.

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index 3e906c3..e2d8666 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -263,8 +263,8 @@ sub rt_too_new {
     my $name = $self->name;
     $msg ||= <<EOT;
 
-**** Error: Your installed version of RT (%s) is too new; this extension
-            only works with versions older than %s.
+**** Warning: Your installed version of RT (%s) is too new; this extension
+              hasn't been tested with it yet.
 
 EOT
     $self->add_metadata("x_rt_too_new", $version) if $self->is_admin;
@@ -273,7 +273,7 @@ EOT
     my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[0] eq $version) {
-        die sprintf($msg,$RT::VERSION,$version);
+        warn sprintf($msg,$RT::VERSION);
     }
 }
 

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


More information about the Bps-public-commit mailing list