File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
bin/composer-scripts/ProjectEvents Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ public static function execute( Event $event ): void {
87
87
88
88
self ::wait ( 2 );
89
89
90
+ // Populate the database.
91
+ self ::populateDatabase ();
92
+
90
93
// Remove the core Twenty-X themes.
91
94
self ::deleteCoreThemes ();
92
95
93
96
// Remove Hello Dolly.
94
97
self ::deleteCorePlugins ();
95
-
96
- // Populate the database.
97
- self ::populateDatabase ();
98
98
}
99
99
100
100
// Run the Viget WP Composer Install
@@ -194,6 +194,10 @@ private static function deleteCoreThemes(): void {
194
194
* @return void
195
195
*/
196
196
private static function deleteCorePlugins (): void {
197
+ if ( ! self ::isWordPressInstalled () ) {
198
+ self ::writeError ( 'WordPress installation failed. Can not delete stock WordPress plugins. ' );
199
+ return ;
200
+ }
197
201
self ::writeInfo ( 'Deleting stock WordPress plugins... ' );
198
202
199
203
foreach ( self ::$ deletePlugins as $ plugin ) {
@@ -505,6 +509,10 @@ private static function installationCleanup(): void {
505
509
* @return void
506
510
*/
507
511
private static function activatePlugins (): void {
512
+ if ( ! self ::isWordPressInstalled () ) {
513
+ self ::writeError ( 'WordPress installation failed. Can not activate stock WordPress plugins. ' );
514
+ return ;
515
+ }
508
516
self ::writeComment ( 'Activating plugins... ' );
509
517
510
518
foreach ( self ::$ activatePlugins as $ slug => $ plugin ) {
You can’t perform that action at this time.
0 commit comments