DEV: makes SKIP_INSTALL_PLUGINS called last and global (#9990)

DEV: makes SKIP_INSTALL_PLUGINS called last and global (#9990)

diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake
index fb706a8..47af6ba 100644
--- a/lib/tasks/docker.rake
+++ b/lib/tasks/docker.rake
@@ -134,6 +134,13 @@ task 'docker:test' do
         @good &&= run_or_fail("bundle exec rake plugin:update_all")
       end
 
+      if skip_install = ENV["SKIP_INSTALL_PLUGINS"]
+        skip_install.split(",").map(&:strip).each do |plugin|
+          puts "[SKIP_INSTALL_PLUGINS] Removing #{plugin}"
+          `rm -fr plugins/#{plugin}`
+        end
+      end
+
       command_prefix =
         if ENV["SKIP_PLUGINS"]
           # Make sure not to load plugins. bin/rake will add LOAD_PLUGINS=1 automatically unless we set it to 0 explicitly
diff --git a/lib/tasks/plugin.rake b/lib/tasks/plugin.rake
index 693f7ef..9da1f43 100644
--- a/lib/tasks/plugin.rake
+++ b/lib/tasks/plugin.rake
@@ -11,10 +11,6 @@ task 'plugin:install_all_official' do
     'poll'
   ])
 
-  if skip_install = ENV["SKIP_INSTALL_PLUGINS"]
-    skip_install.split(",").map(&:strip).each { |plugin| skip << plugin  }
-  end
-
   map = {
     'Canned Replies' => 'https://github.com/discourse/discourse-canned-replies',
     'discourse-perspective' => 'https://github.com/discourse/discourse-perspective-api'

GitHub sha: d4caf69e

2 Likes

This commit appears in #9990 which was merged by jjaffeux.