Sha256: 7d325c5b8cefb2967481f89a233a9a40fe8bc9cb5af603d69f62d51ef8f5c8d3
Contents?: true
Size: 426 Bytes
Versions: 23
Compression:
Stored size: 426 Bytes
Contents
module Simp; end module Simp::CommandUtils require 'facter' def which(cmd, fail=false) @which_cache ||= {} if @which_cache.has_key?(cmd) command = @which_cache[cmd] else command = Facter::Core::Execution.which(cmd) @which_cache[cmd] = command end msg = "Warning: Command #{cmd} not found on the system." ( fail ? raise(msg) : warn(msg) ) unless command command end end
Version data entries
23 entries across 23 versions & 1 rubygems