Method: Aid::Scripts::Doctor::Check#run!
- Defined in:
- lib/aid/scripts/doctor.rb
#run! ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/aid/scripts/doctor.rb', line 16 def run! print "Checking: #{name}... " success = if command.respond_to?(:call) command.call else system "#{command} > /dev/null 2>&1" end if success puts 'OK' else print colorize(:error, 'F') fix = remedy.respond_to?(:join) ? remedy.join(" ") : remedy puts "\n To fix: #{colorize(:command, fix)}\n\n" problems << name end end |