|
7 | 7 | use Composer\Script\Event; |
8 | 8 | use Drupal\Core\Site\Settings; |
9 | 9 | use DrupalFinder\DrupalFinder; |
10 | | -use Robo\Robo; |
11 | 10 | use Symfony\Component\Filesystem\Filesystem; |
12 | 11 | use Webmozart\PathUtil\Path; |
13 | 12 |
|
@@ -47,20 +46,20 @@ public static function createRequiredFiles(Event $event) { |
47 | 46 | // Prepare the settings file for installation. |
48 | 47 | if (!$fs->exists($drupalRoot . '/sites/default/settings.php') && $fs->exists($drupalRoot . '/sites/default/default.settings.php')) { |
49 | 48 | $fs->copy($drupalRoot . '/sites/default/default.settings.php', $drupalRoot . '/sites/default/settings.php'); |
50 | | - } |
51 | | - else { |
52 | 49 | require_once $drupalRoot . '/core/includes/bootstrap.inc'; |
53 | 50 | require_once $drupalRoot . '/core/includes/install.inc'; |
54 | 51 | new Settings([]); |
55 | | - $config_path = Path::makeRelative($drupalFinder->getComposerRoot() . Robo::config()->get('drupal.config.path'), $drupalRoot); |
56 | 52 | $settings['settings']['config_sync_directory'] = (object) [ |
57 | | - 'value' => $config_path, |
| 53 | + 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), |
58 | 54 | 'required' => TRUE, |
59 | 55 | ]; |
60 | 56 | drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php'); |
61 | 57 | $fs->chmod($drupalRoot . '/sites/default/settings.php', 0666); |
62 | 58 | $event->getIO()->write("Created a sites/default/settings.php file with chmod 0666"); |
63 | 59 | } |
| 60 | + else { |
| 61 | + $event->getIO()->write("<info>All required files are created. Good to go!!!...</info>"); |
| 62 | + } |
64 | 63 |
|
65 | 64 | // Create the files directory with chmod 0777. |
66 | 65 | if (!$fs->exists($drupalRoot . '/sites/default/files')) { |
|
0 commit comments