#!/usr/bin/env ruby

# Ensure we can find etch/client.rb when run within the development repository
$:.unshift(File.join(File.dirname(File.dirname(__FILE__)), 'lib'))

# Bundler and rubygems maintain a set of directories from which to
# load gems. If Bundler is loaded, let it determine what can be
# loaded. If it's not loaded, then use rubygems. But do this before
# loading any facter code, so that our gem loading system is sane.
if not defined? ::Bundler
  begin
    require 'rubygems'
  rescue LoadError
  end
end

require 'facter/application'

Facter::Application.run(ARGV)
