diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-07-27 15:30:46 -0700 |
---|---|---|
committer | markus <markus@AVA-351181.(none)> | 2010-08-03 15:19:36 -0700 |
commit | 539b57c1f119be60c774db183dcaec37b1fd5cd5 (patch) | |
tree | 7a217f652f9f4be61e60595ab5465e21b3c4b99e /lib | |
parent | 1faebdd7b54a55b023f151976644dbc3405c486b (diff) | |
download | puppet-539b57c1f119be60c774db183dcaec37b1fd5cd5.tar.gz puppet-539b57c1f119be60c774db183dcaec37b1fd5cd5.tar.xz puppet-539b57c1f119be60c774db183dcaec37b1fd5cd5.zip |
[#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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/application.rb | 2 | ||||
-rw-r--r-- | 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) |