Method: Puppet::Util::Execution.ruby_path
- Defined in:
- lib/puppet/util/execution.rb
.ruby_path ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the path to the ruby executable (available via Config object, even if it’s not in the PATH… so this is slightly safer than just using Puppet::Util.which)
338 339 340 341 342 |
# File 'lib/puppet/util/execution.rb', line 338 def self.ruby_path File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']) .sub(/.*\s.*/m, '"\&"') end |