From 898266f26a6fa64856970e341c2856f830e778c1 Mon Sep 17 00:00:00 2001 From: Clark Burns Date: Mon, 9 Nov 2015 15:36:58 -0800 Subject: [PATCH] Improves plugin:refresh error handling --- modules/system/console/PluginRefresh.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/system/console/PluginRefresh.php b/modules/system/console/PluginRefresh.php index 45be43384..d6c35cb6c 100644 --- a/modules/system/console/PluginRefresh.php +++ b/modules/system/console/PluginRefresh.php @@ -38,6 +38,9 @@ class PluginRefresh extends Command { $pluginName = $this->argument('name'); $pluginName = PluginManager::instance()->normalizeIdentifier($pluginName); + if (!PluginManager::instance()->exists($pluginName)) { + throw new \InvalidArgumentException(sprintf('Plugin "%s" not found.', $pluginName)); + } $manager = UpdateManager::instance()->resetNotes();