Merge pull request #11911 from FnControlOption/patch-1
cmd/cache: add `--HEAD` switch
This commit is contained in:
commit
f9f9d362b7
@ -24,12 +24,14 @@ module Homebrew
|
|||||||
description: "Show the cache file used when building from source."
|
description: "Show the cache file used when building from source."
|
||||||
switch "--force-bottle",
|
switch "--force-bottle",
|
||||||
description: "Show the cache file used when pouring a bottle."
|
description: "Show the cache file used when pouring a bottle."
|
||||||
|
switch "--HEAD",
|
||||||
|
description: "Show the cache file used when building from HEAD."
|
||||||
switch "--formula",
|
switch "--formula",
|
||||||
description: "Only show cache files for formulae."
|
description: "Only show cache files for formulae."
|
||||||
switch "--cask",
|
switch "--cask",
|
||||||
description: "Only show cache files for casks."
|
description: "Only show cache files for casks."
|
||||||
|
|
||||||
conflicts "--build-from-source", "--force-bottle", "--cask"
|
conflicts "--build-from-source", "--force-bottle", "--HEAD", "--cask"
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
@ -60,6 +62,8 @@ module Homebrew
|
|||||||
def print_formula_cache(formula, args:)
|
def print_formula_cache(formula, args:)
|
||||||
if fetch_bottle?(formula, args: args)
|
if fetch_bottle?(formula, args: args)
|
||||||
puts formula.bottle.cached_download
|
puts formula.bottle.cached_download
|
||||||
|
elsif args.HEAD?
|
||||||
|
puts formula.head.cached_download
|
||||||
else
|
else
|
||||||
puts formula.cached_download
|
puts formula.cached_download
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user