diff --git a/modules/system/console/OctoberFresh.php b/modules/system/console/OctoberFresh.php index 627eab62e..a10283268 100644 --- a/modules/system/console/OctoberFresh.php +++ b/modules/system/console/OctoberFresh.php @@ -35,25 +35,30 @@ class OctoberFresh extends Command if (!$this->confirmToProceed('Are you sure?')) { return; } + + $themeRemoved = false; + $pluginRemoved = false; $demoThemePath = themes_path().'/demo'; if (File::exists($demoThemePath)) { File::deleteDirectory($demoThemePath); - - $this->info('Demo theme has been removed! Enjoy a fresh start.'); - } - else { - $this->error('Demo theme is already removed.'); + $themeRemoved = true; } $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.'); + $pluginRemoved = true; } - else { - $this->error('Demo plugin is already removed.'); + + if ($themeRemoved && $pluginRemoved) { + $this->info('Demo theme and plugin have been removed! Enjoy a fresh start.'); + } elseif ($themeRemoved) { + $this->info('Demo theme has been removed! Enjoy a fresh start.'); + } elseif ($pluginRemoved) { + $this->info('Demo plugin has been removed! Enjoy a fresh start.'); + } else { + $this->info('Demo theme and plugin have already been removed.'); } }