Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Commit cd1ae81

Browse files
Also special-case installation via CLI.
1 parent 85de396 commit cd1ae81

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

web/sites/default/settings.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@
2323
CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config',
2424
);
2525

26-
// Check to see if we are serving an installer page.
26+
// Check to see if we are serving an installer page from the web server.
2727
$is_installer_url = (strpos($_SERVER['SCRIPT_NAME'], '/core/install.php') === 0);
28+
// Also check to see if we are calling the installer from a cli (e.g. Drush)
29+
if (php_sapi_name() == 'cli') {
30+
global $install_state;
31+
if (isset(($install_state))) {
32+
$is_installer_url = true;
33+
}
34+
}
2835
if ($is_installer_url && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY] . '/system.site.yml')) {
2936
// Contenta configuration:
3037
// Ideally, we keep our config export in ../config, but it needs to

0 commit comments

Comments
 (0)