bin/hobo in hobo-inviqa-0.0.10 vs bin/hobo in hobo-inviqa-0.0.11

- old
+ new

@@ -2,11 +2,10 @@ # Hack to allow testing with Aruba (for now) $:.push File.expand_path(File.join("..", "..", "lib"), __FILE__) def init_hobo - require 'hobo/init/bundler_context' unless $HOBO_BUNDLE_MODE require 'hobo' # Default main classes error_handler = Hobo::ErrorHandlers::Friendly.new Hobo.ui = Hobo::Ui.new @@ -45,35 +44,58 @@ opts = slop.to_hash Hobo.ui.interactive = !(opts[:'non-interactive'] == true) begin - Hobo::Lib::HostCheck.check(:filter => /not_using_system_ruby/, :raise => true) unless opts[:'skip-host-checks'] Hobo.cli = Hobo::Cli.new(slop: slop) Hobo.cli.start rescue Exception => error exit error_handler.handle(error) ensure ENV['BUNDLE_GEMFILE'] = $OLD_BUNDLE_GEMFILE end end +Gem.configuration.verbose = false + +require 'hobo/util' + +unless Hobo.windows? + if Process.uid == 0 + puts + puts "Hobo must not be run as root" + puts + exit 147 + end + + require "hobo/util" + + if Hobo.windows? and not Hobo.system_ruby? + puts + puts "Hobo is not compatible with system ruby installs" + puts + puts "Please see the installation instructions for hobo on the wiki at https://github.com/inviqa/hobo-gem/wiki" + puts "It is also recommended that you wipe system gems so as to avoid interference. You can achieve this with the following command:" + puts + puts " gem list --no-version | xargs sudo gem uninstall -aIx" + puts + exit 148 + end +end + require 'hobo/patches/rubygems' +require 'hobo/bundler' require 'bundler' # Suppress Net/SSH/Simple warning on windows -# Note that $HOBO_ARGV is used as an indicator in the gemspec as to whether it needs to build a filelist -# Removing it or moving it after the bundler setup will cause "fatal: Not a git repository" errors $SUPPRESS_32BIT_WARNING=1 $HOBO_ARGV = ARGV -# Bundler.environment tries to do Bundler.setup! -# In the event that bundle is missing deps, the means BUNDLE_GEMFILE will not be set! -$HOBO_BUNDLE_MODE = (!!ENV['BUNDLE_GEMFILE'] && Bundler.environment.specs.to_hash['hobo-inviqa']) $OLD_BUNDLE_GEMFILE = ENV['BUNDLE_GEMFILE'] +$HOBO_BUNDLE_MODE = Hobo::Bundler.is_hobo_bundled? if $HOBO_BUNDLE_MODE init_hobo else - Bundler.with_clean_env do + Hobo::Bundler.isolate do init_hobo end end