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