homebrew-cask-versions/lib/cask/source/path_slash_required.rb
Roland Walker f8c9567a66 Don't prefer Cask files in the cwd
Fixes #4641.  Cask files in the cwd are still permitted, but
at the very lowest priority, below Tapped Cask names.
2014-06-03 10:33:19 -04:00

8 lines
210 B
Ruby

require 'cask/source/path_base'
class Cask::Source::PathSlashRequired < Cask::Source::PathBase
def self.me?(query)
path = self.path_for_query(query)
path.to_s.include?('/') and path.exist?
end
end