[Bps-public-commit] Module-Install-RTx branch, master, updated. 0.41-6-g9612f79

? sunnavy sunnavy at bestpractical.com
Wed Jul 15 13:23:12 EDT 2020


The branch, master has been updated
       via  9612f790f78bcb3a79b618dfa92f87bc2448ecaf (commit)
       via  b2f1103f758ca512df6a0ef5eab04520dfbb743c (commit)
       via  6b3a2b2d434bd87102cc32564ac73d787533f756 (commit)
       via  3818a09ec4b97f237136d338fd51a0ccd4bbc28f (commit)
       via  e89a016d0845bc4d235052cfc33412734b8f2abd (commit)
       via  6860d26b3a59482eb5de055555d2fdce67b7a3f5 (commit)
      from  2e3825796f43a41f52666658c457f38e46e343be (commit)

Summary of changes:
 lib/Module/Install/RTx.pm | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 3818a09ec4b97f237136d338fd51a0ccd4bbc28f
Merge: 2e38257 e89a016
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 16 00:18:18 2020 +0800

    Merge branch 'rt-too-new-warn'


commit 6b3a2b2d434bd87102cc32564ac73d787533f756
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 9 04:24:44 2020 +0800

    Notify user if the extension is already cored

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index d423b02..ed236e4 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -76,6 +76,22 @@ sub RTx {
         $self->requires_rt('4.0.0');
     }
 
+    my $package = $name;
+    $package =~ s/-/::/g;
+    if ( $RT::CORED_PLUGINS{$package} ) {
+        my ($base_version) = $RT::VERSION =~ /(\d+\.\d+\.\d+)/;
+        die <<"EOT";
+
+**** Error: Your installed version of RT ($RT::VERSION) already
+            contains this extension in core, so you don't need to
+            install it.
+
+            Check https://docs.bestpractical.com/rt/$base_version/RT_Config.html
+            to configure it.
+
+EOT
+    }
+
     # Installation locations
     my %path;
     my $plugin_path;

commit b2f1103f758ca512df6a0ef5eab04520dfbb743c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 16 00:45:07 2020 +0800

    Add red color to errors to make them stand out

diff --git a/lib/Module/Install/RTx.pm b/lib/Module/Install/RTx.pm
index ed236e4..b107fbe 100644
--- a/lib/Module/Install/RTx.pm
+++ b/lib/Module/Install/RTx.pm
@@ -80,7 +80,7 @@ sub RTx {
     $package =~ s/-/::/g;
     if ( $RT::CORED_PLUGINS{$package} ) {
         my ($base_version) = $RT::VERSION =~ /(\d+\.\d+\.\d+)/;
-        die <<"EOT";
+        die RED, <<"EOT";
 
 **** Error: Your installed version of RT ($RT::VERSION) already
             contains this extension in core, so you don't need to
@@ -239,7 +239,7 @@ sub requires_rt {
     my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[-1] eq $version) {
-        die <<"EOT";
+        die RED, <<"EOT";
 
 **** Error: This extension requires RT $version. Your installed version
             of RT ($RT::VERSION) is too old.

commit 9612f790f78bcb3a79b618dfa92f87bc2448ecaf
Merge: 3818a09 b2f1103
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 16 00:47:27 2020 +0800

    Merge branch 'cored-extension'


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


More information about the Bps-public-commit mailing list