Add "brew --cellar (formula)"
If a formula name is passed to "brew --cellar", output the location of that brew in the Cellar (which will be "brew --prefix (formula)" without a version sub-folder.) This allows for: rm -rf `brew --cellar node` for deleting all versions of node, installed or not.
This commit is contained in:
parent
43c8bec720
commit
48bfd8a585
4
bin/brew
4
bin/brew
@ -88,7 +88,11 @@ begin
|
|||||||
when '--repository'
|
when '--repository'
|
||||||
puts HOMEBREW_REPOSITORY
|
puts HOMEBREW_REPOSITORY
|
||||||
when '--cellar'
|
when '--cellar'
|
||||||
|
if ARGV.named.empty?
|
||||||
puts HOMEBREW_CELLAR
|
puts HOMEBREW_CELLAR
|
||||||
|
else
|
||||||
|
puts *ARGV.formulae.collect {|f| HOMEBREW_CELLAR+f.name}
|
||||||
|
end
|
||||||
when '--config'
|
when '--config'
|
||||||
dump_config
|
dump_config
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user