Skip to content
Snippets Groups Projects
Commit cfd02fd4 authored by Jack Nagel's avatar Jack Nagel
Browse files

Use canonical_name when checking LinkedKegs and opt

name is the user-provided string and may be an alias, path, or URL.
parent 401bc1c6
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,10 @@ module HomebrewArgvExtension
rack = HOMEBREW_CELLAR/canonical_name
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
opt_prefix = HOMEBREW_PREFIX/"opt"/name
linked_keg_ref = HOMEBREW_LIBRARY.join("LinkedKegs", canonical_name)
opt_prefix = HOMEBREW_PREFIX.join("opt", canonical_name)
begin
if opt_prefix.symlink? && opt_prefix.directory?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment