In trying to use sup to upgrade my D6 site, I keep getting the following error at step 12-a (after the database copy operation):

Unknown option: --uninstall. See `drush help pm-disable` for available options. To suppress this [error]
error, add the option --strict=0.

drush help pm-disable shows that there is no --uninstall option (though there is a drush pm-uninstall command). I'm using drush 6.0, though it appears the help for 5.9 says the same thing.

CommentFileSizeAuthor
#5 site upgrade drush errors.txt4.28 KBgMaximus
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mvantuch’s picture

I had the same issue today and resolved it by following steps:

1. Download https://raw.github.com/drush-ops/drush/master/examples/example.drushrc.php into ~/.drush and rename it to drushrc.php if it's not there yet
2. Edit the file and following line to the end
$command_specific['pm-disable'] = array('strict' => 0);

basvredeling’s picture

Is this really a solution? Doesn't it just suppress the error output? Did all your listed uninstallable modules really get uninstalled?

greg.1.anderson’s picture

Yes, #1 really is an error. The problem is that drush sup is sloppy about calling Drush commands, and includes options not needed or intended for that command. Drush got more strict about option checking, hence the error. Drush sup should supply --strict=0 if it is going to continue to be sloppy like this, but until it does, setting it in your drushrc.php is a workaround.

n.b. Copying the entire example.drushrc.php to your drushrc.php folder is excessive; just making your own file that contains the 'strict' => 0 definition (and starts with <?php!) is sufficient.

gMaximus’s picture

Issue summary: View changes

This hasn't fixed this for me... Really stuck on what to do next... I tried adding the line to the file and also to the command but neither resolves the error.

gMaximus’s picture

Here is the output from running this command inside my d6 site:

drush site-upgrade @d7site --prompt-all --skip-optional --strict=0 --force-sites-default --verbose

I didn't include everything just the last part. If all of it helps let me know... I'd really appreciate any help that may be available. The d6 site was originally part of a multisite...

greg.1.anderson’s picture

The --strict=0 is not necessarily propagated to the subcommands. Put `$options['strict'] = 0;` in one of your drushrc.php files.

gMaximus’s picture

Hi Greg,

I did try both (ie the command first and then the file after reading this issue) and got the same result. On this occasion I manually picked up where the script aborted because I was on a deadline.

I do have several other websites that need the upgrade. So perhaps it's best to try another site and come back here if I experience the same issue.

Could contributed modules anything to do with it?

Many thanks,
Guy

edit: sorry I tried "$command_specific['pm-disable'] = array('strict' => 0)"; and not "$options['strict'] = 0;" ... I'll come back as soon as I try the next upgrade either way.

yan’s picture

Adding $command_specific['pm-disable'] = array('strict' => 0); seems to solve the problem for me. Thanks!

alttaf’s picture

My Drush configuration file was simply misplaced, I had to put it in Drupal's directory (sites/all/drush/drushrc.php) rather than ~/.drush/

When running drush status from your Drupal source site directory, make sure there is a Drush configuration loaded.

Drush version : 6.2.0
Drush configuration : /var/www/html/drupal/sites/all/drush/drushrc.php
Drush alias files : /root/.drush/my.alias.drushrc.php
And here is the content of file sites/all/drush/drushrc.php

$options['strict'] = FALSE;

create a drush folder in your root and put your drushrc.php file there if you dont know where to put it

taken from drupal answers

gMaximus’s picture

#9 solved it for me. Many thanks

el_toro’s picture

#9 worked for me too. Thanks.

ronnienorwood’s picture

#9 got rid of the error for me as well. Just uncommented that line in the drushrc.php file. Thanks.

greg.1.anderson’s picture

Using a command specific option, as in #8, is much better than setting strict to FALSE globally. If you follow the advice of #9, you will disable option validation for all Drush commands, which is not desirable.

At a minimum, whether you use #8 or #9, you should remove your additions to your drushrc.php once you are finished using the site-upgrade command.