 a1f112f3fe
			
		
	
	
		a1f112f3fe
		
			
		
	
	
	
	
		
			
			This reduces the surface area of our `Kernel` monkeypatch and removes the need to `include Kernel` in a bunch of modules. While we're here, also move `Kernel#require?` to `Homebrew` and fully scope the calls to it.
		
			
				
	
	
		
			24 lines
		
	
	
		
			598 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			598 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # typed: strict
 | |
| # frozen_string_literal: true
 | |
| 
 | |
| require "utils/output"
 | |
| 
 | |
| module Cask
 | |
|   class Uninstall
 | |
|     extend ::Utils::Output::Mixin
 | |
| 
 | |
|     sig { params(casks: ::Cask::Cask, binaries: T::Boolean, force: T::Boolean, verbose: T::Boolean).void }
 | |
|     def self.uninstall_casks(*casks, binaries: false, force: false, verbose: false)
 | |
|       require "cask/installer"
 | |
| 
 | |
|       casks.each do |cask|
 | |
|         odebug "Uninstalling Cask #{cask}"
 | |
| 
 | |
|         raise CaskNotInstalledError, cask if !cask.installed? && !force
 | |
| 
 | |
|         Installer.new(cask, binaries:, force:, verbose:).uninstall
 | |
|       end
 | |
|     end
 | |
|   end
 | |
| end
 |