Allow october:fresh to remove remove the demo plugin even when the demo theme has already been removed (#5275)

This commit is contained in:
Marc Jauvin 2020-09-13 18:51:09 -04:00 committed by GitHub
parent dca6128501
commit fc9d6233a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -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.');
}
}
/**