summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface/action_builder.rb
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-05-04 10:40:55 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-05-04 12:28:44 -0700
commitdda32647b4c11ecb352e469088f2438835ff99d7 (patch)
treea9e420f5978e15ce0eacdeca51a3a18d3ea8e944 /lib/puppet/interface/action_builder.rb
parentefd118114bab228b5f8f4a437ead8be2cc895d8a (diff)
downloadpuppet-dda32647b4c11ecb352e469088f2438835ff99d7.tar.gz
puppet-dda32647b4c11ecb352e469088f2438835ff99d7.tar.xz
puppet-dda32647b4c11ecb352e469088f2438835ff99d7.zip
(#7353) Note the :for_humans compatibility issue.
Where we need special support for :for_humans as an alias for :console, call it out in comments. This makes it clear to someone who wonders why what the actual underlying purpose of the whole thing is. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib/puppet/interface/action_builder.rb')
-rw-r--r--lib/puppet/interface/action_builder.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/interface/action_builder.rb b/lib/puppet/interface/action_builder.rb
index 0bf4f1408..16305530a 100644
--- a/lib/puppet/interface/action_builder.rb
+++ b/lib/puppet/interface/action_builder.rb
@@ -38,6 +38,8 @@ class Puppet::Interface::ActionBuilder
def render_as(value = nil)
value.nil? and raise ArgumentError, "You must give a rendering format to render_as"
+ # :for_humans is a compatibility alias for :console, but since we shipped
+ # it in 2.7.0rc1 we need to support it ongoing. --daniel 2011-05-04
formats = Puppet::Network::FormatHandler.formats << :for_humans
unless formats.include? value
raise ArgumentError, "#{value.inspect} is not a valid rendering format: #{formats.sort.join(", ")}"