diff options
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r-- | lib/chef/knife.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index 7812fd232f..74507a4319 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -201,12 +201,18 @@ class Chef subcommand_class || subcommand_not_found!(args) end + def self.dependency_loaders + @dependency_loaders ||= [] + end + def self.deps(&block) - @dependency_loader = block + dependency_loaders << block end def self.load_deps - @dependency_loader && @dependency_loader.call + dependency_loaders.each do |dep_loader| + dep_loader.call + end end private |