mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Make plugin load order deterministic
This commit is contained in:
parent
2c7b47fc40
commit
f361adef44
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue