Exception: Puppet::ModuleTool::Errors::AlreadyInstalledError
- Inherits:
-
InstallError
- Object
- RuntimeError
- Error
- ModuleToolError
- InstallError
- Puppet::ModuleTool::Errors::AlreadyInstalledError
- Defined in:
- lib/puppet/module_tool/errors/installer.rb
Instance Attribute Summary
Attributes inherited from Error
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/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}' (%{version}) requested; '%{module_name}' (%{installed_version}) already installed") % { module_name: @module_name, version: @requested_version, installed_version: @installed_version } end |
Instance Method Details
#multiline ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet/module_tool/errors/installer.rb', line 14 def multiline = [] << _("Could not install module '%{module_name}' (%{version})") % { module_name: @module_name, version: @requested_version } << _(" Module '%{module_name}' (%{installed_version}) is already installed") % { module_name: @module_name, installed_version: @installed_version } << _(" Installed module has had changes made locally") unless @local_changes.empty? #TRANSLATORS `puppet module upgrade` is a command line and should not be translated << _(" Use `puppet module upgrade` to install a different version") #TRANSLATORS `puppet module install --force` is a command line and should not be translated << _(" Use `puppet module install --force` to re-install only this module") .join("\n") end |