if defined?(Bundler)
  Bundler.with_clean_env do
    exec [$PROGRAM_NAME,$PROGRAM_NAME], *ARGV
  end
end

require_relative 'version'
require_relative 'plugins'

$:.push File.expand_path(File.join("..", ".."), __FILE__)
require 'bundler'
require 'hem'

if defined?(Bundler)
  Bundler.with_clean_env do
    exec [$PROGRAM_NAME,$PROGRAM_NAME], *ARGV
  end
end

require_relative 'version'
require_relative 'plugins'

gem 'hem', Hem::VERSION unless ENV['HEM_OMNIBUS']

require 'bundler'
require 'hem'

Enforce Hem's spec constraints on hem in gem mode
Enforce Hem's spec constraints on hem in gem mode

This is so that it requiring it's dependencies respects its own constraints on them
