You are here

function drush_environment_switch_validate in Environment 8

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

Implements drush_hook_COMMAND_validate() for environment_switch.

File

./environment.drush.inc, line 113
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.'));
  }
}