Skip to content

Commit

Permalink
Fixes #1674: Config Import Incorrect On Multi-site install. (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Jun 19, 2017
1 parent 3e20a29 commit 32c1b35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion config/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ drupal:
drush:
bin: ${composer.bin}/drush
dir: ${docroot}
uri: default
assume: yes
passthru: yes
logoutput: yes
Expand Down
4 changes: 3 additions & 1 deletion src/Robo/Hooks/InitHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public function initialize() {
// We set the value for site late in the bootstrap process so that a user
// may define its value at runtime via --define. This can only happen after
// input has been processed.
$site = $this->getConfigValue('site', 'default');
$multisites = $this->getConfigValue('multisites');
$first_multisite = reset($multisites);
$site = $this->getConfigValue('site', $first_multisite);
$this->getConfig()->setSiteConfig($site);
}

Expand Down

1 comment on commit 32c1b35

@simesy
Copy link

@simesy simesy commented on 32c1b35 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grasmash just noting. The above didn't fix our multisite deployments. We had to fix them with this patch on DeployCommand.php. we don't have drush.uri set anywhere that we can see (eg it's not in our project.yml ... not sure if it's our problem.

diff --git a/src/Robo/Commands/Deploy/DeployCommand.php b/src/Robo/Commands/Deploy/DeployCommand.php
index 0ac167af..c401475e 100644
--- a/src/Robo/Commands/Deploy/DeployCommand.php
+++ b/src/Robo/Commands/Deploy/DeployCommand.php
@@ -572,9 +572,7 @@ public function updateSites() {
 
     foreach ($this->getConfigValue('multisites') as $multisite) {
       $this->say("Deploying updates to $multisite...");
-      if (!$this->config->get('drush.uri')) {
-        $this->config->set('drush.uri', $multisite);
-      }
+      $this->config->set('drush.uri', $multisite);
 
       $this->invokeCommand('setup:config-import');
       $this->invokeCommand('setup:toggle-modules');

Please sign in to comment.