mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 08:54:29 +08:00
Make plugin load order deterministic
This commit is contained in:
@ -11,7 +11,7 @@ class Plugin::Instance
|
|||||||
def self.find_all(parent_path)
|
def self.find_all(parent_path)
|
||||||
[].tap { |plugins|
|
[].tap { |plugins|
|
||||||
# also follows symlinks - http://stackoverflow.com/q/357754
|
# also follows symlinks - http://stackoverflow.com/q/357754
|
||||||
Dir["#{parent_path}/**/*/**/plugin.rb"].each do |path|
|
Dir["#{parent_path}/**/*/**/plugin.rb"].sort.each do |path|
|
||||||
source = File.read(path)
|
source = File.read(path)
|
||||||
metadata = Plugin::Metadata.parse(source)
|
metadata = Plugin::Metadata.parse(source)
|
||||||
plugins << self.new(metadata, path)
|
plugins << self.new(metadata, path)
|
||||||
|
Reference in New Issue
Block a user