function drush_return_status

8.0.x preflight.inc drush_return_status()
6.x bootstrap.inc drush_return_status()
7.x preflight.inc drush_return_status()
3.x drush.php drush_return_status()
4.x drush.php drush_return_status()
5.x bootstrap.inc drush_return_status()
master preflight.inc drush_return_status()
1 string reference to 'drush_return_status'
drush_shutdown in includes/preflight.inc
Shutdown function for use while Drush and Drupal are bootstrapping and to return any registered errors.

File

includes/preflight.inc, line 797
Preflight, postflight and shutdown code.

Code

function drush_return_status() {
  // If a specific exit code was set, then use it.
  $exit_code = drush_get_context('DRUSH_EXIT_CODE');
  if (empty($exit_code)) {
    $exit_code = (drush_get_error()) ? DRUSH_FRAMEWORK_ERROR : DRUSH_SUCCESS;
  }

  exit($exit_code);
}