mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
allow plugins to be symlinked
This commit is contained in:
@ -10,7 +10,8 @@ class Plugin::Instance
|
||||
|
||||
def self.find_all(parent_path)
|
||||
[].tap { |plugins|
|
||||
Dir["#{parent_path}/**/plugin.rb"].each do |path|
|
||||
# also follows symlinks - http://stackoverflow.com/q/357754
|
||||
Dir["#{parent_path}/**/*/**/plugin.rb"].each do |path|
|
||||
source = File.read(path)
|
||||
metadata = Plugin::Metadata.parse(source)
|
||||
plugins << self.new(metadata, path)
|
||||
|
Reference in New Issue
Block a user