function DrushMakeProject_Core::findDownloadLocation

8.0.x make.project.inc DrushMakeProject_Core::findDownloadLocation()
6.x make.project.inc DrushMakeProject_Core::findDownloadLocation()
7.x make.project.inc DrushMakeProject_Core::findDownloadLocation()
5.x make.project.inc DrushMakeProject_Core::findDownloadLocation()
master make.project.inc DrushMakeProject_Core::findDownloadLocation()

Determine the location to download project to.

Overrides DrushMakeProject::findDownloadLocation

File

commands/make/make.project.inc, line 496
Drush Make processing classes.

Class

DrushMakeProject_Core
For processing Drupal core projects.

Code

function findDownloadLocation() {
  $this->path = $this->download_location = $this->generatePath();
  $this->project_directory = '';
  if (is_dir($this->download_location)) {
    drush_set_error('MAKE_DIRECTORY_EXISTS', dt('Directory not empty: !directory', array('!directory' => $this->download_location)));
    return FALSE;
  }
  elseif ($this->download['type'] === 'pm') {
    // pm-download will create the final __build__ directory, so nothing to do
    // here.
  }
  else {
    drush_mkdir($this->download_location);
  }
  return $this->download_location;
}