Sha256: 5ce63a70f88f596767fc7661308b51b237f7ab3cf2a38cea6f8b9bbb5ab4e651

Contents?: true

Size: 537 Bytes

Versions: 8

Compression:

Stored size: 537 Bytes

Contents

module Puppet
  module Util
    module Platform
      def windows?
        # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard
        # library uses that to test what platform it's on. In some places we
        # would use Puppet.features.microsoft_windows?, but this method can be
        # used to determine the behavior of the underlying system without
        # requiring features to be initialized and without side effect.
        !!File::ALT_SEPARATOR
      end
      module_function :windows?
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/util/platform.rb
puppet-3.0.0.rc5 lib/puppet/util/platform.rb
puppet-3.0.0.rc4 lib/puppet/util/platform.rb
puppet-2.7.19 lib/puppet/util/platform.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/util/platform.rb
puppet-2.7.18 lib/puppet/util/platform.rb
puppet-2.7.17 lib/puppet/util/platform.rb
puppet-2.7.16 lib/puppet/util/platform.rb