bin/hobo in hobo-inviqa-0.0.10.pre.rc8 vs bin/hobo in hobo-inviqa-0.0.10.pre.rc9
- old
+ new
@@ -3,30 +3,30 @@
# Hack to allow testing with Aruba (for now)
$:.push File.expand_path(File.join("..", "..", "lib"), __FILE__)
# Hack to override Gemfile to that of hobo (otherwise it'll use project specific one!)
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
-
-# Ensure hobo gems are used
require 'hobo/patches/rubygems'
require 'bundler'
Bundler.setup(:default)
# Suppress Net/SSH/Simple warning on windows
$SUPPRESS_32BIT_WARNING=1
-require 'hobo'
-
$HOBO_ARGV = ARGV
-error_handler = Hobo::ErrorHandlers::Friendly.new
+require 'hobo'
+# Default main classes
+error_handler = Hobo::ErrorHandlers::Friendly.new
Hobo.ui = Hobo::Ui.new
Hobo.logger = Logger.new(STDOUT)
Hobo.logger.level = Logger::WARN
-# Options parsed here will be hidden from the main app
+# Low level / early arg parsing
+# Anything that can alter ui / logger / cli should be here
+# Early termination args should also go here
slop = Slop.parse! do
on '--debug', 'Enable debugging' do
require 'teerb'
require 'tmpdir'
error_handler = Hobo::ErrorHandlers::Debug.new
@@ -53,10 +53,10 @@
opts = slop.to_hash
Hobo.ui.interactive = !(opts[:'non-interactive'] == true)
begin
- Hobo::Lib::HostCheck.check(:filter => /not_using_system_ruby/)
+ Hobo::Lib::HostCheck.check(:filter => /not_using_system_ruby/, :raise => true)
Hobo.cli = Hobo::Cli.new(slop: slop)
Hobo.cli.start
rescue Exception => error
exit error_handler.handle(error)
end