diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb index f1a0308e57..036a0ac4cb 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb @@ -45,13 +45,10 @@ module Hbc end def run - at_exit do - cleanup - end - Dir.chdir git_root do modified_cask_files.zip(modified_casks).each do |cask_file, cask| audit(cask, cask_file) + Cleanup.run(cask) if cleanup? end end report_failures @@ -121,9 +118,6 @@ module Hbc "#{failed_casks.join(" ")}" end - def cleanup - Cleanup.run if cleanup? - end end end end