brew-pin: Fix bug in FormulaPin#pinned?
Since `pinned?` was using `File#exists?`, broken symlinks left by force-upgraded formulae made `pinned?` return false while `pin` returned with an error because it could not overwrite the broken link. This is fixed by using `File#symlink?` instead, which returns true for broken symlinks and false only when they do not exist. Closes Homebrew/homebrew#18858. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
040138164b
commit
4cd95652ea
@ -27,7 +27,7 @@ class FormulaPin
|
||||
end
|
||||
|
||||
def pinned?
|
||||
@path.exist?
|
||||
@path.symlink?
|
||||
end
|
||||
|
||||
def pinable?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user