function drush_which

8.0.x exec.inc drush_which($command)
master exec.inc drush_which($command)

Determine whether 'which $command' can find a command on this system.

Related topics

1 call to drush_which()
InitCommandFile::initializeDrush in lib/Drush/CommandFiles/core/InitCommandFile.php
Initialize local Drush configuration

File

includes/exec.inc, line 174
Functions for executing system commands. (e.g. exec(), system(), ...).

Code

function drush_which($command) {
  exec("which $command 2>&1", $output, $result);
  return ($result == 0);
}