function xh_enabled

8.0.x xh.drush.inc xh_enabled()
7.x xh.drush.inc xh_enabled()
master xh.drush.inc xh_enabled()
2 calls to xh_enabled()
xh_drush_exit in commands/xh.drush.inc
Implements hook_drush_exit().
xh_drush_init in commands/xh.drush.inc
Implements hook_drush_init().

File

commands/xh.drush.inc, line 34

Code

function xh_enabled() {
  if (drush_get_option('xh')) {
    if (!extension_loaded('xhprof')) {
      return drush_set_error('You must enable the xhprof PHP extension in your CLI PHP in order to profile.');
    }
    if (!drush_get_option('xh-path', '')) {
      return drush_set_error('You must provide the xh-path option in your drushrc or on the CLI in order to profile.');
    }
    return TRUE;
  }
}