Skip to content
Browse files

Fixing a load-order issue in Puppet::Interface

The application classes were having issues loading
the Interface class in certain circumstances because of
load order.  This just pushes the loading as late as possible.

Signed-off-by: Luke Kanies <luke@puppetlabs.com>
  • Loading branch information...
1 parent 23f4ff3 commit 84ba21e66660a67e20c1194780138317e6a39d49 @lak committed Mar 21, 2011
Showing with 5 additions and 2 deletions.
  1. +0 −1 lib/puppet/application/indirection_base.rb
  2. +5 −1 lib/puppet/application/interface_base.rb
View
1 lib/puppet/application/indirection_base.rb
@@ -1,5 +1,4 @@
require 'puppet/application/interface_base'
-require 'puppet/interface'
class Puppet::Application::IndirectionBase < Puppet::Application::InterfaceBase
option("--terminus TERMINUS") do |arg|
View
6 lib/puppet/application/interface_base.rb
@@ -1,5 +1,4 @@
require 'puppet/application'
-require 'puppet/interface'
class Puppet::Application::InterfaceBase < Puppet::Application
should_parse_config
@@ -41,6 +40,11 @@ def exit_code
@exit_code || 0
end
+ def initialize(*args)
+ require 'puppet/interface'
+ super
+ end
+
def main
# Call the method associated with the provided action (e.g., 'find').
if result = interface.send(verb, *arguments)

0 comments on commit 84ba21e

Please sign in to comment.
Something went wrong with that request. Please try again.