From ed604349a4035eed2bccefa9aa030d93ad4f6b58 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 18 Aug 2015 11:58:05 -0700 Subject: moved commands to leap_platform --- bin/leap | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/leap b/bin/leap index 8da9356..3bb8975 100755 --- a/bin/leap +++ b/bin/leap @@ -15,7 +15,6 @@ else end LEAP_CLI_BASE_DIR = File.expand_path('..', File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__)) -ORIGINAL_ARGV = ARGV.dup begin # First, try to load the leap_cli code that is local to this `leap` command. @@ -74,17 +73,13 @@ module LeapCli::Commands program_desc LeapCli::SUMMARY program_long_desc LeapCli::DESCRIPTION + LeapCli::Bootstrap::setup(ARGV) + # handle --version ourselves (and not GLI) if ARGV.grep(/--version/).any? - puts "leap #{LeapCli::VERSION}, ruby #{RUBY_VERSION}" - begin - commands_from('leap_cli/commands') - initialize_leap_cli(false, {:verbose => 2}) - rescue StandardError => exc - puts exc.to_s - raise exc if DEBUG - end - exit(0) + LeapCli::Bootstrap::handle_version(self) + else + LeapCli::Bootstrap::load_libraries(self) end # disable GLI error catching @@ -92,9 +87,6 @@ module LeapCli::Commands def error_message(msg) end - # load commands - commands_from('leap_cli/commands') - # run command begin exit_status = run(ARGV) -- cgit v1.2.3