Remove errors from `october:fresh` and indicate which demo files were moved
Follow-up work to fc9d6233a8.
This commit is contained in:
parent
fc9d6233a8
commit
216b0d6004
|
|
@ -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.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue