Module: Conify::CLI

Extended by:
Helpers
Defined in:
lib/conify/cli.rb

Class Method Summary collapse

Methods included from Helpers

allow_user_response, ask_for_conflux_creds, ask_for_password, ask_for_password_on_windows, camelize, display, echo_off, echo_on, error, exclusive_deep_merge, format_with_bang, host, host_url, kensa_manifest_name, kensa_manifest_path, manifest_content, manifest_filename, manifest_path, manually_added_methods, open_url, running_on_a_mac?, running_on_windows?, site_url, to_table, with_tty

Class Method Details

.start!(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/conify/cli.rb', line 7

def self.start!(*args)
  # Setup StdIn/StdOut sync
  $stdin.sync = true if $stdin.isatty
  $stdout.sync = true if $stdout.isatty

  # Strip out command
  command = args.shift.strip rescue 'help'

  require 'conify/command'

  # Find and run command if it exists
  Conify::Command.find_command(command, args)

rescue Errno::EPIPE => e
  error(e.message)
rescue Interrupt => e
  error('Command cancelled.')
rescue => e
  error(e)
end