Class | Facter::Util::Resolution |
In: |
lib/facter/util/resolution.rb
|
Parent: | Object |
INTERPRETER | = | Facter::Util::Config.is_windows? ? "cmd.exe" : "/bin/sh" |
code | [RW] | |
interpreter | [RW] | |
name | [RW] | |
timeout | [RW] |
Determine in a platform-specific way whether a path is absolute. This defaults to the local platform if none is specified.
Execute a program and return the output of that program.
Returns nil if the program can‘t be found, or if there is a problem executing the code.
Expand the executable of a commandline to an absolute path. The executable is the first word of the commandline. If the executable contains spaces, it has be but in double quotes to be properly recognized.
Returns the commandline with the expanded binary or nil if the binary can‘t be found. If the path to the binary contains quotes, the whole binary is put in quotes.
Returns the locations to be searched when looking for a binary. This is currently determined by the PATH environment variable plus /sbin and /usr/sbin when run on unix
Determine the full path to a binary. If the supplied filename does not already describe an absolute path then different locations (determined by self.search_paths) will be searched for a match.
Returns nil if no matching executable can be found otherwise returns the expanded pathname.