Skip to content

Commit

Permalink
F OpenNebula#3237: reverse order
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Huertas committed Apr 6, 2020
1 parent 1e562dd commit 44c7761
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/oneprovision/lib/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def read_config(name)
end

if yaml['extends']
yaml['extends'].each do |f|
yaml['extends'] = [yaml['extends']].flatten

yaml['extends'].reverse.each do |f|
base = read_config(f)

yaml.delete('extends')
Expand All @@ -247,7 +249,7 @@ def read_config(name)
base['defaults'][section].merge!(defaults)
end

yaml.merge!(base)
yaml = base
end
end

Expand Down

0 comments on commit 44c7761

Please sign in to comment.