Closed (won't fix)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Core Commands
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
30 Nov 2011 at 17:44 UTC
Updated:
11 Sep 2013 at 05:07 UTC
Using the latest Drush 5 on multisite install, the site is not picked up by drush si, though it is by drush st. The following commands are run from within the multisite dir sites/localhost.msdf-bare.drupal:
$ ~/projects/drush/drush-5.x/drush --debug si
Bootstrap to phase 0. [0.01 sec, 3.09 MB]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.28 MB]
Loading drushrc "/Applications/MAMP/htdocs/msdf/drupal/drushrc.php" into "drupal" scope. [0.01 sec, 3.29 MB]
Cache HIT cid: 5.0-dev-commandfiles-0-411a78cee4816c0387dc5be5195923ee [0.02 sec, 3.31 MB]
Bootstrap to phase 0. [0.04 sec, 6.83 MB]
Bootstrap to phase 1. [0.05 sec, 6.84 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 6.84 MB]
Initialized Drupal 7.9 root directory at /Users/scor/htdocs/msdf-bare/drupal [0.08 sec, 9.61 MB]
Found command: site-install (commandfile=core) [0.08 sec, 9.61 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.1 sec, 9.65 MB]
Initialized Drupal site default at sites/default [0.1 sec, 9.66 MB]
$ ~/projects/drush/drush-5.x/drush --debug st
Bootstrap to phase 0. [0.01 sec, 3.09 MB]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.28 MB]
Loading drushrc "/Applications/MAMP/htdocs/msdf/drupal/drushrc.php" into "drupal" scope. [0.01 sec, 3.29 MB]
Cache HIT cid: 5.0-dev-commandfiles-0-411a78cee4816c0387dc5be5195923ee [0.02 sec, 3.31 MB]
Bootstrap to phase 0. [0.04 sec, 6.83 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.05 sec, 6.84 MB]
Initialized Drupal 7.9 root directory at /Users/scor/htdocs/msdf-bare/drupal [0.08 sec, 9.61 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.08 sec, 9.62 MB]
Initialized Drupal site localhost.msdf-bare.drupal at sites/localhost.msdf-bare.drupal [0.08 sec, 9.62 MB]
Note how the Initialized Drupal site is different depending on the command. I've tried a few commands, so far it seems this only affect si. I can only reproduce this in Drush 5, not in Drush 4.
Comments
Comment #1
moshe weitzman commentedsi us "special". can you pass --uri and see if we get it right? the value should be the name of the subdir under /sites.
Comment #2
moshe weitzman commentedsi is "special". can you pass --uri and see if we get it right? the value should be the name of the subdir under /sites.
Comment #3
greg.1.anderson commentedI think that the issue here is that si is DRUSH_BOOTSTRAP_DRUPAL_ROOT, whereas st is BOOTSTRAP_MAX.
I would hesitate to make si attempt to "guess" which site in a multisite to install to; it would be really bad to auto-select the wrong site and blow away something you wanted to keep. Current behavior, requiring --uri, is correct, I think.
Comment #4
scor commentedTotally agreed. But unfortunately, that's what happens to the default site if you are located in a multi site directory and run
drush si: your default site will be wiped out. Note that thesisite discovery worked perfectly well in Drush 4, so this is a regression.I'm assuming there is a strong reason for not trying to auto-discover the current multi site based on sniffing the
cwd()?Comment #5
greg.1.anderson commentedHmmm. Drush does still auto-discover the current multisite based on cwd in other instances. Maybe I broke this feature for DRUSH_BOOTSTRAP_DRUPAL_ROOT when I modified the Drush bootstrap to identify the root and uri earlier in the bootstrap process.
If this were only for si, I might just shrug it off and say it's a feature, not a bug. :) However, if DRUSH_BOOTSTRAP_DRUPAL_ROOT really did break, that could be bad for other commands as well, so it at least bears some investigation.
Comment #6
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.
Comment #6.0
greg.1.anderson commentedcode