You are here

function drush_environment_switch_validate in Environment 7

Same name and namespace in other branches
  1. 8 environment.drush.inc \drush_environment_switch_validate()
  2. 6 environment.drush.inc \drush_environment_switch_validate()

Implements drush_hook_COMMAND_validate() for environment_switch.

File

./environment.drush.inc, line 73
Executes the environment_switch capabilities.

Code

function drush_environment_switch_validate($target_env = NULL) {
  $environments = environment_load();
  if (empty($environments)) {
    return drush_set_error('DRUSH_ENVIRONMENT_ERROR', dt('There are no defined environments available.'));
  }
}