Exception: Puppet::ModuleTool::Errors::LocalChangesError

Inherits:
ModuleToolError show all
Defined in:
lib/puppet/module_tool/errors/shared.rb

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ LocalChangesError

Returns a new instance of LocalChangesError.



161
162
163
164
165
166
167
# File 'lib/puppet/module_tool/errors/shared.rb', line 161

def initialize(options)
  @module_name       = options[:module_name]
  @requested_version = options[:requested_version]
  @installed_version = options[:installed_version]
  @action            = options[:action]
  super _("Could not %{action} '%{module_name}'; module has had changes made locally") % { action: @action, module_name: @module_name }
end

Instance Method Details

#multilineObject



169
170
171
172
173
174
175
176
# File 'lib/puppet/module_tool/errors/shared.rb', line 169

def multiline
  message = []
  message << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring }
  message << _("  Installed module has had changes made locally")
  #TRANSLATORS `puppet module %{action} --ignore-changes` is a command line and should not be translated
  message << _("    Use `puppet module %{action} --ignore-changes` to %{action} this module anyway") % { action: @action }
  message.join("\n")
end