diff options
author | elijah <elijah@riseup.net> | 2016-10-05 14:35:56 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-10-05 14:35:56 -0700 |
commit | 7abfbd6abae14fa6a72350f7b75268ff561354ee (patch) | |
tree | af5c969c905a8d2a95f2b2aa7c4dd6f4b8763126 /bin | |
parent | cc57bc6c0ff99d88f3bfeff1b04297e9b91e6988 (diff) | |
parent | f95e08ef7d8defbde4a19e138b1ac4ebc9677669 (diff) |
Merge branch 'develop'
# Conflicts:
# lib/leap_cli/version.rb
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/leap | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -14,6 +14,7 @@ else $VERBOSE=nil DEBUG=false end +TEST = false LEAP_CLI_BASE_DIR = File.expand_path('..', File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__)) @@ -27,8 +28,6 @@ rescue LoadError end require 'gli' -require 'highline' -require 'forwardable' require 'leap_cli/lib_ext/gli' # our custom extensions to gli # @@ -40,16 +39,6 @@ require 'leap_cli/lib_ext/gli' # our custom extensions to gli # module LeapCli::Commands extend GLI::App - extend Forwardable - - # delegate highline methods to make them available to sub-commands - @terminal = HighLine.new - def_delegator :@terminal, :ask, 'self.ask' - def_delegator :@terminal, :agree, 'self.agree' - def_delegator :@terminal, :choose, 'self.choose' - def_delegator :@terminal, :say, 'self.say' - def_delegator :@terminal, :color, 'self.color' - def_delegator :@terminal, :list, 'self.list' # make config manager available as 'manager' def self.manager @@ -90,6 +79,9 @@ module LeapCli::Commands # run command begin + if ARGV.any? + LeapCli.log_raw(:log, nil, "COMMAND") { 'leap ' + ARGV.join(' ') } + end exit_status = run(ARGV) exit(LeapCli::Util.exit_status || exit_status) rescue StandardError => exc @@ -102,6 +94,8 @@ module LeapCli::Commands end if DEBUG raise exc + else + exit(1) end end end |