Exception: Puppet::ModuleTool::Errors::LocalChangesError
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::LocalChangesError
- Defined in:
- lib/puppet/module_tool/errors/shared.rb
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ LocalChangesError
constructor
A new instance of LocalChangesError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ LocalChangesError
Returns a new instance of LocalChangesError.
157 158 159 160 161 162 163 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 157 def initialize() @module_name = [:module_name] @requested_version = [:requested_version] @installed_version = [:installed_version] @action = [:action] super _("Could not %{action} '%{module_name}'; module has had changes made locally") % { action: @action, module_name: @module_name } end |
Instance Method Details
#multiline ⇒ Object
165 166 167 168 169 170 171 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 165 def multiline = [] << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring } << _(" Installed module has had changes made locally") << _(" Use `puppet module %{action} --ignore-changes` to %{action} this module anyway") % { action: @action } .join("\n") end |