From 539b57c1f119be60c774db183dcaec37b1fd5cd5 Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Tue, 27 Jul 2010 15:30:46 -0700 Subject: [#4347] run_mode was colliding with --mode for "puppet doc" The run_mode value was incorrectly getting stored to Puppet[:mode], which was confusing the optparser for applications that declare a --mode parameter. --- lib/puppet/application.rb | 2 +- lib/puppet/defaults.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb index 0a8fbc155..2fec38bf2 100644 --- a/lib/puppet/application.rb +++ b/lib/puppet/application.rb @@ -285,7 +285,7 @@ class Application Puppet.settings.set_value(:name, Puppet.application_name.to_s, :mutable_defaults) Puppet.settings.set_value(:logdir, Puppet.run_mode.logopts, :mutable_defaults) Puppet.settings.set_value(:rundir, Puppet.run_mode.run_dir, :mutable_defaults) - Puppet.settings.set_value(:mode, Puppet.run_mode.name.to_s, :mutable_defaults) + Puppet.settings.set_value(:run_mode, Puppet.run_mode.name.to_s, :mutable_defaults) end require 'puppet' diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 4b8004a0f..1c5ca53f1 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -7,7 +7,7 @@ module Puppet :vardir => [Puppet.run_mode.var_dir, "Where Puppet stores dynamic and growing data. The default for this parameter is calculated specially, like `confdir`_."], :name => [Puppet.application_name.to_s, "The name of the application, if we are running as one. The default is essentially $0 without the path or ``.rb``."], - :mode => [Puppet.run_mode.name.to_s, "The effective 'run mode' of the application: master, agent, or user."] + :run_mode => [Puppet.run_mode.name.to_s, "The effective 'run mode' of the application: master, agent, or user."] ) setdefaults(:main, :logdir => Puppet.run_mode.logopts) -- cgit