nixpkgs/pkgs/servers/web-apps/discourse/auto_generated_path.patch
talyz af15cbe6b0
discourse: Change the path to the auto generated plugin assets
Change the path to the auto generated plugin assets, which defaults to
the plugin's directory and isn't writable at the time of asset
generation.

(cherry picked from commit 443b318ee9c614d480a2ecb0120b52806d6fbb3b)
2021-08-17 23:16:28 +02:00

14 lines
392 B
Diff

diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb
index 380a63e987..b2ce7fa982 100644
--- a/lib/plugin/instance.rb
+++ b/lib/plugin/instance.rb
@@ -403,7 +403,7 @@ class Plugin::Instance
end
def auto_generated_path
- File.dirname(path) << "/auto_generated"
+ "#{Rails.root}/public/assets/auto_generated_plugin_assets/#{name}"
end
def after_initialize(&block)