Sha256: d4591c98967233ffeb9d274efb754ae3bf369ad9606934af4bb73a082878f1cd

Contents?: true

Size: 408 Bytes

Versions: 29

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    class Path < BaseResolver
      @semaphore = Mutex.new
      @fact_list ||= {}

      class << self
        private

        def post_resolve(fact_name)
          @fact_list.fetch(fact_name) { read_path_from_env }
        end

        def read_path_from_env
          @fact_list[:path] = ENV['PATH']
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
facter-4.0.36 lib/facter/resolvers/path_resolver.rb
facter-4.0.35 lib/facter/resolvers/path_resolver.rb
facter-4.0.34 lib/facter/resolvers/path_resolver.rb
facter-4.0.33 lib/facter/resolvers/path_resolver.rb
facter-4.0.32 lib/facter/resolvers/path_resolver.rb
facter-4.0.31 lib/facter/resolvers/path_resolver.rb
facter-4.0.30 lib/facter/resolvers/path_resolver.rb
facter-4.0.29 lib/resolvers/path_resolver.rb
facter-4.0.28 lib/resolvers/path_resolver.rb
facter-4.0.26 lib/resolvers/path_resolver.rb
facter-4.0.25 lib/resolvers/path_resolver.rb
facter-4.0.24 lib/resolvers/path_resolver.rb
facter-4.0.23 lib/resolvers/path_resolver.rb
facter-4.0.22 lib/resolvers/path_resolver.rb
facter-4.0.21 lib/resolvers/path_resolver.rb
facter-4.0.20 lib/resolvers/path_resolver.rb
facter-4.0.19 lib/resolvers/path_resolver.rb
facter-4.0.18 lib/resolvers/path_resolver.rb
facter-4.0.17 lib/resolvers/path_resolver.rb
facter-4.0.16 lib/resolvers/path_resolver.rb