Use canonical_name when checking LinkedKegs and opt
name is the user-provided string and may be an alias, path, or URL.
This commit is contained in:
parent
401bc1c6c7
commit
cfd02fd415
@ -20,10 +20,10 @@ module HomebrewArgvExtension
|
|||||||
rack = HOMEBREW_CELLAR/canonical_name
|
rack = HOMEBREW_CELLAR/canonical_name
|
||||||
dirs = rack.directory? ? rack.subdirs : []
|
dirs = rack.directory? ? rack.subdirs : []
|
||||||
|
|
||||||
raise NoSuchKegError.new(rack.basename.to_s) if dirs.empty?
|
raise NoSuchKegError.new(canonical_name) if dirs.empty?
|
||||||
|
|
||||||
linked_keg_ref = HOMEBREW_REPOSITORY/"Library/LinkedKegs"/name
|
linked_keg_ref = HOMEBREW_LIBRARY.join("LinkedKegs", canonical_name)
|
||||||
opt_prefix = HOMEBREW_PREFIX/"opt"/name
|
opt_prefix = HOMEBREW_PREFIX.join("opt", canonical_name)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if opt_prefix.symlink? && opt_prefix.directory?
|
if opt_prefix.symlink? && opt_prefix.directory?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user