function drush_core_drupal_directory

8.0.x drush_core_drupal_directory($target = 'root')
6.x drush_core_drupal_directory($target = 'root')
7.x drush_core_drupal_directory($target = 'root')
3.x drush_core_drupal_directory($target = 'root')
4.x drush_core_drupal_directory($target = 'root')
5.x drush_core_drupal_directory($target = 'root')
master drush_core_drupal_directory($target = 'root')


commands/core/, line 760
Core drush commands.


function drush_core_drupal_directory($target = 'root') {
  $path = _drush_core_directory($target, drush_get_option('component', 'path'), drush_get_option('local', FALSE));

  // If _drush_core_directory is working right, it will turn
  // %blah into the path to the item referred to by the key 'blah'.
  // If there is no such key, then no replacement is done.  In the
  // case of the dd command, we will consider it an error if
  // any keys are -not- replaced in _drush_core_directory.
  if ((isset($path)) && (strpos($path, '%') === FALSE)) {
  else {
    return drush_set_error('DRUSH_TARGET_NOT_FOUND', dt("Target '!target' not found.", array('!target' => $target)));

  return TRUE;