Merge pull request #8387 from MLH-Fellowship/deprecate-cask-cache

cask --cache: Deprecate command
This commit is contained in:
Mike McQuaid 2020-08-18 16:01:47 +01:00 committed by GitHub
commit e2fb26b855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -18,6 +18,9 @@ module Cask
end end
def run def run
# TODO: enable for next major/minor release
# odeprecated "brew cask --cache", "brew --cache --cask"
casks.each do |cask| casks.each do |cask|
puts self.class.cached_location(cask) puts self.class.cached_location(cask)
end end

View File

@ -8,6 +8,7 @@ module Cask
end end
def run def run
# TODO: enable for next major/minor release
# odeprecated "brew cask home", "brew home" # odeprecated "brew cask home", "brew home"
if casks.none? if casks.none?

View File

@ -25,14 +25,9 @@ describe Cask::Cmd::Cache, :cask do
cache: Cask::Cache.path, **local_caffeine.url.specs cache: Cask::Cache.path, **local_caffeine.url.specs
).cached_location ).cached_location
expect do expect(described_class.cached_location(local_transmission))
described_class.run("local-transmission", "local-caffeine") .to eql transmission_location
end.to output("#{transmission_location}\n#{caffeine_location}\n").to_stdout expect(described_class.cached_location(local_caffeine))
end .to eql caffeine_location
it "properly handles Casks that are not present" do
expect {
described_class.run("notacask")
}.to raise_error(Cask::CaskUnavailableError)
end end
end end