Closed joachim-n closed 5 years ago
I dont follow the bug. $config_directories['sync'] gets written to settings.php by the drupal installer and is required to be present.
$config_directories['sync'] gets written to settings.php by the drupal installer
Indeed. I was advised to remove the $config_directories['sync'] value in settings.php by Acquia support, as ACSF sets a different config location, and (so I was told) the presence of two locations in the $config_directories array is causing problems.
is required to be present
Hmm, I see what you mean -- that's assumed by Drupal core's config UI, and so is effectively a core requirement. I was thinking it might not bother Drush.
Describe the bug
If you remove $config_directories[CONFIG_SYNC_DIRECTORY], then the cex and cim commands crash.
(Yes this is possibly crazy -- chasing a different bug in ACSF and was advised to remove it...)
To Reproduce
Remove it in settings.php (well in my case, ACSF hooks, but the net effect is the same).
Expected behavior
Drush sees there is only one config directory location, and uses it by default.
Actual behavior
Crash:
The problem is in code like this:
config_get_config_directory() is getting called with CONFIG_SYNC_DIRECTORY and CONFIG_SYNC_DIRECTORY might not be a valid location, in which case, config_get_config_directory() throws an exception.
(I've checked latest Drush and that code is there too.)
System Configuration