35 lines
648 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-11-03 08:37:06 +10:00
require "system_config"
require "diagnostic"
2017-11-03 08:37:06 +10:00
2018-09-06 08:29:14 +02:00
module Cask
2018-09-04 08:45:48 +01:00
class Cmd
2017-05-20 19:08:03 +02:00
class Doctor < AbstractCommand
2020-08-01 02:30:46 +02:00
def self.max_named
0
2017-05-21 00:15:56 +02:00
end
2020-08-01 02:30:46 +02:00
def self.description
"Checks for configuration issues."
end
2017-05-21 00:15:56 +02:00
def run
success = true
checks = Homebrew::Diagnostic::Checks.new 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
2016-09-24 13:52:43 +02:00
end
2016-08-18 22:11:42 +03:00
end
end