The drush_set_error() function in drush.inc expects string error codes, but dog passes numeric values.

 * @param error
 *   A text string identifying the type of error.

Any numeric code gets replaced by 'DRUSH_FRAME_WORK_ERROR' :

  if (is_numeric($error)) {
    $error = 'DRUSH_FRAMEWORK_ERROR';
  }

Comments

sdboyer’s picture

Status: Active » Reviewed & tested by the community

Yeah, I'm discovering that. I talked with msonnabaum a fair bit about this recently; apparently drush shifted over to only allowing two exit statuses a while back. Can't exactly remember why. I'm going to see what I can do about reintroducing extension-controlled exit statuses, but will shift the errors over to strings until then.

sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Fixed & pushed into master.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.