From 76c02cac65e8e87133e8369f1ba4d72ff7e02174 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 6 Aug 2020 16:10:57 +0100 Subject: [PATCH] DEV: Ensure the correct plugin stylesheets are reloaded in development If a plugin name contained the name of another plugin, the wrong stylesheets would be reloaded. For example, working on discourse-prometheus-alert-receiver would cause discourse-prometheus stylesheets to be reloaded. --- lib/stylesheet/watcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rb index 908e5b3617b..089c0643e38 100644 --- a/lib/stylesheet/watcher.rb +++ b/lib/stylesheet/watcher.rb @@ -61,7 +61,7 @@ module Stylesheet paths.map! do |long| plugin_name = nil plugins_paths.each do |plugin_path| - if long.include?(plugin_path) + if long.include?("#{plugin_path}/") plugin_name = File.basename(plugin_path) break end