Spec-Zone.ru › Homebrew

Exception: Keg::ConflictError Private

Inherits:
LinkError
  • Object
  • RuntimeError
  • LinkError
  • Keg::ConflictError
show all
Defined in:
keg.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Error for when a file already exists or belongs to another keg.

Instance Attribute Summary

Attributes inherited from LinkError

#dst, #keg, #src

Instance Method Summary collapse

  • #suggestion ⇒ String private

Methods inherited from LinkError

#initialize

Constructor Details

This class inherits a constructor from Keg::LinkError

Instance Method Details

#suggestion ⇒ String

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:

  • (String)


55
56
57
58
59
60
61
62
63
64
# File 'keg.rb', line 55

def suggestion
  conflict = Keg.for(dst)
rescue NotAKegError, Errno::ENOENT
  "already exists. You may want to remove it:\n  rm '#{dst}'\n"
else
  <<~EOS
    is a symlink belonging to #{conflict.name}. You can unlink it:
      brew unlink #{conflict.name}  EOS
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Keg/ConflictError.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API