mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
If we delete stuff in the clean step, make fuss
/cc @jwheare
This commit is contained in:
parent
55dc5466fb
commit
12d17155cf
@ -52,6 +52,8 @@ class Cleaner
|
|||||||
# Clean a single folder (non-recursively)
|
# Clean a single folder (non-recursively)
|
||||||
def clean_dir d
|
def clean_dir d
|
||||||
d.find do |path|
|
d.find do |path|
|
||||||
|
path.extend(NoiseyPathname) if ARGV.verbose?
|
||||||
|
|
||||||
if path.directory?
|
if path.directory?
|
||||||
# Stop cleaning this subtree if protected
|
# Stop cleaning this subtree if protected
|
||||||
Find.prune if @f.skip_clean? path
|
Find.prune if @f.skip_clean? path
|
||||||
@ -72,3 +74,15 @@ class Cleaner
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
class Pathname
|
||||||
|
alias_method :orig_unlink, :unlink
|
||||||
|
end
|
||||||
|
|
||||||
|
module NoiseyPathname
|
||||||
|
def unlink
|
||||||
|
puts "rm: #{self}"
|
||||||
|
orig_unlink
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@ -303,6 +303,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def clean
|
def clean
|
||||||
|
ohai "Cleaning" if ARGV.verbose?
|
||||||
if f.class.skip_clean_all?
|
if f.class.skip_clean_all?
|
||||||
opoo "skip_clean :all is deprecated"
|
opoo "skip_clean :all is deprecated"
|
||||||
puts "Skip clean was commonly used to prevent brew from stripping binaries."
|
puts "Skip clean was commonly used to prevent brew from stripping binaries."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user