class Dokku::CLI

Public Class Methods

start(*args) click to toggle source
# File lib/dokku/cli.rb, line 8
def self.start(*args)
  begin
    if $stdin.isatty
      $stdin.sync = true
    end
    if $stdout.isatty
      $stdout.sync = true
    end
    command = args.shift.strip rescue "help"
    Dokku::Command.load
    Dokku::Command.run(command, args)
  rescue Interrupt
    `stty icanon echo`
    error("Command cancelled.")
  rescue => error
    error(error)
    exit(1)
  end
end