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.



155
156
157
158
159
160
161
# File 'lib/puppet/module_tool/errors/shared.rb', line 155

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"
end

Instance Method Details

#multilineObject



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

def multiline
  message = []
  message << "Could not #{@action} module '#{@module_name}' (#{vstring})"
  message << "  Installed module has had changes made locally"
  message << "    Use `puppet module #{@action} --ignore-changes` to #{@action} this module anyway"
  message.join("\n")
end