Sha256: efbccafa90af7a3531865c4aaba43ca584cf12e993a61a4be98959d9c477a684

Contents?: true

Size: 668 Bytes

Versions: 343

Compression:

Stored size: 668 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?

      def default_paths
        return [] if windows?

        %w{/usr/sbin /sbin}
      end
      module_function :default_paths
    end
  end
end

Version data entries

343 entries across 343 versions & 5 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/util/platform.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/util/platform.rb
puppet-5.3.7 lib/puppet/util/platform.rb
puppet-5.3.7-x86-mingw32 lib/puppet/util/platform.rb
puppet-5.3.7-x64-mingw32 lib/puppet/util/platform.rb
puppet-5.3.7-universal-darwin lib/puppet/util/platform.rb
puppet-4.10.12 lib/puppet/util/platform.rb
puppet-4.10.12-x86-mingw32 lib/puppet/util/platform.rb
puppet-4.10.12-x64-mingw32 lib/puppet/util/platform.rb
puppet-4.10.12-universal-darwin lib/puppet/util/platform.rb
puppet-4.10.11 lib/puppet/util/platform.rb
puppet-4.10.11-x86-mingw32 lib/puppet/util/platform.rb
puppet-4.10.11-x64-mingw32 lib/puppet/util/platform.rb
puppet-4.10.11-universal-darwin lib/puppet/util/platform.rb
puppet-5.3.6 lib/puppet/util/platform.rb
puppet-5.3.6-x86-mingw32 lib/puppet/util/platform.rb
puppet-5.3.6-x64-mingw32 lib/puppet/util/platform.rb
puppet-5.3.6-universal-darwin lib/puppet/util/platform.rb
puppet-5.3.5 lib/puppet/util/platform.rb
puppet-5.3.5-x86-mingw32 lib/puppet/util/platform.rb