mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
keg: check that alias path exists before checking realpath.
Otherwise this can be a broken symlink which will raise an exception: https://github.com/Homebrew/homebrew-core/runs/1704569542?check_suite_focus=true#step:6:47
This commit is contained in:
parent
053ca17b50
commit
1857dfcd2e
@ -650,7 +650,7 @@ class Keg
|
||||
|
||||
def remove_alias_symlink(alias_symlink, alias_match_path)
|
||||
if alias_symlink.symlink? && alias_symlink.exist?
|
||||
alias_symlink.delete if alias_symlink.realpath == alias_match_path.realpath
|
||||
alias_symlink.delete if alias_match_path.exist? && alias_symlink.realpath == alias_match_path.realpath
|
||||
elsif alias_symlink.symlink? || alias_symlink.exist?
|
||||
alias_symlink.delete
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user