Method: PSWindows::Exec#which
- Defined in:
- lib/beaker/host/pswindows/exec.rb
#which(command) ⇒ String
First path it finds for the command executable
243 244 245 246 247 248 249 250 |
# File 'lib/beaker/host/pswindows/exec.rb', line 243 def which(command) where_command = "cmd /C \"where #{command}\"" result = execute(where_command, :accept_all_exit_codes => true) return '' if result.empty? result end |