Module: Puppet::Util::Platform
- Defined in:
- lib/vendor/puppet/util/platform.rb
Class Method Summary collapse
Class Method Details
.default_paths ⇒ Object
14 15 16 17 18 |
# File 'lib/vendor/puppet/util/platform.rb', line 14 def default_paths return [] if windows? %w{/usr/sbin /sbin} end |
.windows? ⇒ Boolean
4 5 6 7 8 9 10 11 |
# File 'lib/vendor/puppet/util/platform.rb', line 4 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 |