summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-07-21 15:34:52 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-07-22 13:29:25 -0700
commit1e0655e6bdbc872014abdffa5deacb334616e826 (patch)
treee855a5823898d78668a860abae681dc88cd1282e /lib/puppet/application
parent039661156116cb6d3c5c8e372ed4d81af221453b (diff)
downloadpuppet-1e0655e6bdbc872014abdffa5deacb334616e826.tar.gz
puppet-1e0655e6bdbc872014abdffa5deacb334616e826.tar.xz
puppet-1e0655e6bdbc872014abdffa5deacb334616e826.zip
(#7184) Centralize "find action for face" into Puppet::Face
As part of moving to load actions first, and their associated face, when invoked from the command line, it makes sense to push the logic for finding the action and face down into the Puppet::Face implementation. This means that we can change the logic there without needing to update the public part of the CLI implementation, and that any further facades can use the same, correct, logic to locate the action for the face. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/face_base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/application/face_base.rb b/lib/puppet/application/face_base.rb
index ea5ba4aaf..a111518f1 100644
--- a/lib/puppet/application/face_base.rb
+++ b/lib/puppet/application/face_base.rb
@@ -100,7 +100,8 @@ class Puppet::Application::FaceBase < Puppet::Application
# action object it represents; if this is an invalid action name that
# will be nil, and handled later.
action_name = item.to_sym
- @action = @face.get_action(action_name)
+ @action = Puppet::Face.find_action(@face.name, action_name)
+ @face = @action.face if @action
end
end