2020-08-20 02:05:17 +01:00

34 lines
642 B
Ruby

# frozen_string_literal: true
module Cask
class Cmd
class Doctor < AbstractCommand
def self.max_named
0
end
def self.description
"Checks for configuration issues."
end
def run
require "diagnostic"
success = true
checks = Homebrew::Diagnostic::Checks.new(verbose: true)
checks.cask_checks.each do |check|
out = checks.send(check)
if out.present?
success = false
puts out
end
end
raise CaskError, "There are some problems with your setup." unless success
end
end
end
end