Merge pull request #1315 from jawshooah/cask/load-only-rb
hbc/locations: arg is file only if absolute or .rb file
This commit is contained in:
commit
c18441e81b
@ -133,9 +133,8 @@ module Hbc
|
||||
def path(query)
|
||||
query_path = Pathname.new(query)
|
||||
|
||||
if query_path.exist? || query_path.absolute?
|
||||
return query_path
|
||||
end
|
||||
return query_path if query_path.absolute?
|
||||
return query_path if query_path.exist? && query_path.extname == ".rb"
|
||||
|
||||
query_without_extension = query.sub(%r{\.rb$}i, "")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user