Exception: Puppet::ModuleTool::Errors::AlreadyInstalledError
- Inherits:
-
InstallError
- Object
- StandardError
- ModuleToolError
- InstallError
- Puppet::ModuleTool::Errors::AlreadyInstalledError
- Defined in:
- lib/vendor/puppet/module_tool/errors/installer.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ AlreadyInstalledError
constructor
A new instance of AlreadyInstalledError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ AlreadyInstalledError
Returns a new instance of AlreadyInstalledError.
6 7 8 9 10 11 12 |
# File 'lib/vendor/puppet/module_tool/errors/installer.rb', line 6 def initialize() @module_name = [:module_name] @installed_version = v([:installed_version]) @requested_version = v([:requested_version]) @local_changes = [:local_changes] super "'#{@module_name}' (#{@requested_version}) requested; '#{@module_name}' (#{@installed_version}) already installed" end |
Instance Method Details
#multiline ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/vendor/puppet/module_tool/errors/installer.rb', line 14 def multiline = [] << "Could not install module '#{@module_name}' (#{@requested_version})" << " Module '#{@module_name}' (#{@installed_version}) is already installed" << " Installed module has had changes made locally" unless @local_changes.empty? << " Use `puppet module upgrade` to install a different version" << " Use `puppet module install --force` to re-install only this module" .join("\n") end |