function drush_make_validate

8.0.x make.drush.inc drush_make_validate($makefile = NULL, $build_path = NULL)
7.x make.drush.inc drush_make_validate($makefile = NULL, $build_path = NULL)
master make.drush.inc drush_make_validate($makefile = NULL, $build_path = NULL)

Validation callback for make command.

File

commands/make/make.drush.inc, line 267
Drush Make commands.

Code

function drush_make_validate($makefile = NULL, $build_path = NULL) {
  // Don't validate if --version option is supplied.
  if (drush_get_option('version', FALSE)) {
    return;
  }

  if (drush_get_option('shallow-clone', FALSE) && drush_get_option('working-copy', FALSE)) {
    return drush_set_error('MAKE_SHALLOW_CLONE_WORKING_COPY_CONFLICT', dt('You cannot use "--shallow-clone" and "--working-copy" options together.'));
  }

  // Error out if the build path is not valid and --no-build was not supplied.
  if (!drush_get_option('no-build', FALSE) && !make_build_path($build_path)) {
    return FALSE;
  }
}