class Schked::CLI

def self.exit_on_failure?

def self.exit_on_failure?
  true
end

def self.start(argv)

def self.start(argv)
  if File.exist?(".schked")
    argv += File
      .read(".schked")
      .split("\n")
      .join(" ")
      .strip
      .shellsplit
  end
  super(argv)
end

def load_requires

def load_requires
  options[:require].each { |file| load(File.join(Dir.pwd, file)) } if options[:require]&.any?
  # We have to load Schked at here, because of Rails and our railtie.
  require "schked"
end

def show

def show
  load_requires
  puts "====="
  puts Schked.worker.schedule
  puts "====="
end

def start

def start
  load_requires
  Schked.worker.wait
end