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
def run
# TODO: enable for next major/minor release
# odeprecated "brew cask --cache", "brew --cache --cask"
casks.each do |cask|
puts self.class.cached_location(cask)
end

View File

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

View File

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