From 794510f4e0e45f3504fdbda70ca989d8579968be Mon Sep 17 00:00:00 2001 From: FnControlOption <70830482+FnControlOption@users.noreply.github.com> Date: Thu, 26 Aug 2021 14:37:27 -0700 Subject: [PATCH] cmd/cache: add --bottle-tag flag --- Library/Homebrew/cmd/--cache.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/--cache.rb b/Library/Homebrew/cmd/--cache.rb index 2e945cf87..062041163 100644 --- a/Library/Homebrew/cmd/--cache.rb +++ b/Library/Homebrew/cmd/--cache.rb @@ -24,6 +24,8 @@ module Homebrew description: "Show the cache file used when building from source." switch "--force-bottle", description: "Show the cache file used when pouring a bottle." + flag "--bottle-tag", + description: "Show the cache file used when pouring a bottle for the given tag." switch "--HEAD", description: "Show the cache file used when building from HEAD." switch "--formula", @@ -31,7 +33,7 @@ module Homebrew switch "--cask", description: "Only show cache files for casks." - conflicts "--build-from-source", "--force-bottle", "--HEAD", "--cask" + conflicts "--build-from-source", "--force-bottle", "--bottle-tag", "--HEAD", "--cask" conflicts "--formula", "--cask" named_args [:formula, :cask] @@ -61,7 +63,7 @@ module Homebrew sig { params(formula: Formula, args: CLI::Args).void } def print_formula_cache(formula, args:) if fetch_bottle?(formula, args: args) - puts formula.bottle.cached_download + puts formula.bottle_for_tag(args.bottle_tag).cached_download elsif args.HEAD? puts formula.head.cached_download else