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

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

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ LocalChangesError

Returns a new instance of LocalChangesError.



99
100
101
102
103
104
105
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 99

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 is not installed"
end

Instance Method Details

#multilineObject



107
108
109
110
111
112
113
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 107

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