Method: Aruba::Platforms::UnixPlatform#which

Defined in:
lib/aruba/platforms/unix_platform.rb

#which(program, path = ENV["PATH"]) ⇒ Object

Resolve path for command using the PATH-environment variable

Mostly taken from here: github.com/djberg96/ptools

Parameters:

  • program (#to_s)

    The name of the program which should be resolved

  • path (String) (defaults to: ENV["PATH"])

    The PATH, a string concatenated with “:”, e.g. /usr/bin/:/bin on a UNIX-system



237
238
239
# File 'lib/aruba/platforms/unix_platform.rb', line 237

def which(program, path = ENV["PATH"])
  UnixWhich.new.call(program, path)
end