Skip to content

Commit

Permalink
Removed 'not found' from error message, as that case already handled …
Browse files Browse the repository at this point in the history
…by validateConfigDir(); added checked directory to message. (#5748) (#5881)
  • Loading branch information
joachim-n authored and weitzman committed Mar 2, 2024
1 parent 841bf44 commit fd9e0da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/core/SiteInstallCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ protected function determineProfile($profile, $options)
// @todo Arguably Drupal core [$boot->getKernel()->getInstallProfile()] could do this - https://github.com/drupal/drupal/blob/8.6.x/core/lib/Drupal/Core/DrupalKernel.php#L1606 reads from DB storage but not file storage.
if (empty($profile) && $options['existing-config']) {
FileCacheFactory::setConfiguration([FileCacheFactory::DISABLE_CACHE => true]);
$source_storage = new FileStorage(Settings::get('config_sync_directory'));
$config_directory = Settings::get('config_sync_directory');
$source_storage = new FileStorage($config_directory);
if (!$source_storage->exists('core.extension')) {
throw new \Exception('Existing configuration directory not found or does not contain a core.extension.yml file.".');
throw new \Exception(dt('Existing configuration directory @config does not contain a core.extension.yml file.', ['@config' => $config_directory]));
}
$config = $source_storage->read('core.extension');
$profile = $config['profile'];
Expand Down

0 comments on commit fd9e0da

Please sign in to comment.