diff --git a/src/Commands/core/SiteInstallCommands.php b/src/Commands/core/SiteInstallCommands.php index 8e0e122fbe..b0a2b13262 100644 --- a/src/Commands/core/SiteInstallCommands.php +++ b/src/Commands/core/SiteInstallCommands.php @@ -98,7 +98,7 @@ public function install(array $recipeOrProfile, $options = ['db-url' => self::RE // Was giving error during validate() so its here for now. if ($options['existing-config']) { $existing_config_dir = Settings::get('config_sync_directory'); - if (!is_dir($existing_config_dir)) { + if ($existing_config_dir === null || !is_dir($existing_config_dir)) { throw new \Exception(dt('Existing config directory @dir not found', ['@dir' => $existing_config_dir])); } $this->logger()->info(dt('Installing from existing config at @dir', ['@dir' => $existing_config_dir]));