In #2017189: Option validation skipped for --backend requests '--invoke' was eliminated in favour of '--strict=0'. We'll need to change this in our code if we want to support Drush 6.x. Does anyone see any reasons that '--strict=0' wouldn't work for us?

Comments

ergonlogic’s picture

Status: Active » Needs review
StatusFileSize
new2.14 KB

It looks like just switch from 'invoke' => TRUE to 'strict' => FALSE in the 3 places we do this should be sufficient. See attached patch.

ergonlogic’s picture

Actually, I got this error when attempting to install a site:

Unknown option: --client_email. See `drush help provision-install-backend` for available options. To suppress this error, add the option --strict=0.

So, we can either add 'client_email' as an option to 'provision-install-backend' (which I think is the correct solution):

  $items['provision-install-backend'] = array(
    'description' => dt('Provision a new site using the provided data.'),
    'options' => array(
      'client_email' => dt('The email address of the client to use.'),
    ),
    'hidden' => TRUE,
    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_SITE
  );

Or we could call provision_backend_invoke() with --strict=0:

$result = provision_backend_invoke(d()->name, "provision-install-backend", array(), array('client_email' => drush_get_option('client_email'), 'strict' => FALSE));

anarcat’s picture

Is this backwards-compatible with drush 5?

I agree that adding client_email to -backend is the right way.

ergonlogic’s picture

Yes, it's compatible with Drush 5.

Fixed in f488709 for Hosting, and c8febbc in Provision.

ergonlogic’s picture

Status: Needs review » Fixed

no, really, fixed!

Status: Fixed » Closed (fixed)

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

jwjoshuawalker’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
StatusFileSize
new583 bytes

client_email option also needs to be added to provision-import or you get the same error.

Patch attached for latest 6.x-2.x

jwjoshuawalker’s picture

Interesting.. I also just got it on a verify task. It had verified the same site twice before without running into that, but this last time it ran the command:

provision-verify   --profile=spark --client_email='admin@drastikbydesign.com' 2>&1

Unknown options: --profile, --client_email

The only option I see in provision-verify is: working-copy

anarcat’s picture

Status: Needs review » Fixed

committed, thanks.

Status: Fixed » Closed (fixed)

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

  • Commit 9bc7ca2 on 6.x-2.x, 7.x-3.x, 6.x-2.x-backports, dev-helmo-3.x authored by drastik, committed by anarcat:
    Issue #2038891 by drastik: add missing --client-email option
    
  • Commit c8febbc on dev-drupal-8, 6.x-2.x, dev-ssl-ip-allocation-refactor, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by ergonlogic:
    Issue #2038891: Add 'client_email' option to 'provision-install-backend...