Method: Puppet::ModuleTool.set_option_defaults
- Defined in:
- lib/puppet/module_tool.rb
.set_option_defaults(options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO:
Validate the above note…
Note:
Unfortunately the whole point of this method is the side effect of
modifying the options parameter. This same hash is referenced both when_invoked and when_rendering. For this reason, we are not returning a duplicate. An :environment_instance and a :target_dir are added/updated in the options parameter.
125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/puppet/module_tool.rb', line 125 def self.set_option_defaults() current_environment = () modulepath = [[:target_dir]] + current_environment.full_modulepath face_environment = current_environment.override_with(:modulepath => modulepath.compact) [:environment_instance] = face_environment # Note: environment will have expanded the path [:target_dir] = face_environment.full_modulepath.first end |