Sha256: da5fa4c32c1edb33f371003028ffed8be3d5ea432db013337de5393cbde36d95

Contents?: true

Size: 695 Bytes

Versions: 7

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Macosx
      class Filesystems < BaseResolver
        # :macosx_filesystems
        init_resolver

        class << self
          private

          def post_resolve(fact_name, _options)
            @fact_list.fetch(fact_name) { read_filesystems(fact_name) }
          end

          def read_filesystems(fact_name)
            output = Facter::Core::Execution.execute('mount', logger: log)
            filesystems = output.scan(/\(([a-z]+),*/).flatten
            @fact_list[:macosx_filesystems] = filesystems.uniq.sort.join(',')
            @fact_list[fact_name]
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facter-4.10.0 lib/facter/resolvers/macosx/filesystems.rb
facter-4.9.0 lib/facter/resolvers/macosx/filesystems.rb
facter-4.8.0 lib/facter/resolvers/macosx/filesystems.rb
facter-4.7.1 lib/facter/resolvers/macosx/filesystems.rb
facter-4.7.0 lib/facter/resolvers/macosx/filesystems.rb
facter-4.6.1 lib/facter/resolvers/macosx/filesystems.rb
facter-4.6.0 lib/facter/resolvers/macosx/filesystems.rb