From fc9d6233a8da738b5b8bbdf2fb7e6fd67da12b66 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Sun, 13 Sep 2020 18:51:09 -0400 Subject: [PATCH] Allow october:fresh to remove remove the demo plugin even when the demo theme has already been removed (#5275) --- modules/system/console/OctoberFresh.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/system/console/OctoberFresh.php b/modules/system/console/OctoberFresh.php index e87e5422d..627eab62e 100644 --- a/modules/system/console/OctoberFresh.php +++ b/modules/system/console/OctoberFresh.php @@ -37,16 +37,24 @@ class OctoberFresh extends Command } $demoThemePath = themes_path().'/demo'; - if (File::exists($demoThemePath)) { - Artisan::call('plugin:remove', ['name' => 'October.Demo', '--force' => true]); File::deleteDirectory($demoThemePath); - $this->info('Demo has been removed! Enjoy a fresh start.'); + $this->info('Demo theme has been removed! Enjoy a fresh start.'); } else { $this->error('Demo theme is already removed.'); } + + $demoPluginPath = plugins_path().'/october/demo'; + if (File::exists($demoPluginPath)) { + Artisan::call('plugin:remove', ['name' => 'October.Demo', '--force' => true]); + + $this->info('Demo plugin has been removed! Enjoy a fresh start.'); + } + else { + $this->error('Demo plugin is already removed.'); + } } /**