Skip to content

Commit

Permalink
Merge 309186b into fbc52a0
Browse files Browse the repository at this point in the history
  • Loading branch information
mckern committed Jun 23, 2016
2 parents fbc52a0 + 309186b commit 4f7e17b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/facter.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ module Facter
# Simply require libfacter.so; this will define all of the Facter API
begin
facter_dir = ENV['FACTERDIR'] || File.join(File.expand_path("#{File.dirname(__FILE__)}"), '${LIBFACTER_INSTALL_RELATIVE}')
#
# This is a cmake pre-processor check. On *nix it will end up '' == '1'
# On windows, where we want the changes it will be '1' == '1'
#
# Facter requires the extra inclusion of puppet/bin as the libfacter.so
# lib requires libraries and executables from that directory
if '${WIN32}' == '1'
ENV['PATH'] = "#{File.join(facter_dir, 'bin')}#{File::PATH_SEPARATOR}#{File.join(facter_dir, '../puppet/bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
ENV['PATH'] = "#{File.join(facter_dir, 'bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
end
require "#{facter_dir}/${LIBFACTER_INSTALL_DESTINATION}/libfacter.so"
rescue LoadError
Expand Down

0 comments on commit 4f7e17b

Please sign in to comment.