From 4d5081f4bfccb7fa4b1e7be711178cb29525cbb0 Mon Sep 17 00:00:00 2001 From: Edward Barnard Date: Mon, 13 Apr 2020 14:11:07 -0500 Subject: [PATCH 1/2] Check vcs repo. --- src/Utility/CommonOptionsTrait.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Utility/CommonOptionsTrait.php b/src/Utility/CommonOptionsTrait.php index 6d38b6a08..8bacb5a0e 100644 --- a/src/Utility/CommonOptionsTrait.php +++ b/src/Utility/CommonOptionsTrait.php @@ -81,6 +81,11 @@ protected function _setCommonOptions(ConsoleOptionParser $parser): ConsoleOption { $bakeThemes = []; foreach (Plugin::loaded() as $plugin) { + print_r([ + 'plugin'=>$plugin, + 'path'=>Plugin::path($plugin), + 'classPath'=>Plugin::classPath($plugin), + ]); $path = Plugin::classPath($plugin); if (is_dir($path . 'Template' . DS . 'Bake')) { $bakeThemes[] = $plugin; From 761aab9d8b656e76581702ffeaeaa8d302093b7f Mon Sep 17 00:00:00 2001 From: Edward Barnard Date: Mon, 13 Apr 2020 14:16:57 -0500 Subject: [PATCH 2/2] Set correct list of plugin theme choices. --- src/Utility/CommonOptionsTrait.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Utility/CommonOptionsTrait.php b/src/Utility/CommonOptionsTrait.php index 8bacb5a0e..c9a0708c4 100644 --- a/src/Utility/CommonOptionsTrait.php +++ b/src/Utility/CommonOptionsTrait.php @@ -14,6 +14,7 @@ * @since 1.4.3 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ + namespace Bake\Utility; use Cake\Console\Arguments; @@ -80,14 +81,10 @@ protected function extractCommonProperties(Arguments $args): void protected function _setCommonOptions(ConsoleOptionParser $parser): ConsoleOptionParser { $bakeThemes = []; + $templates = 'templates' . DS . 'bake'; foreach (Plugin::loaded() as $plugin) { - print_r([ - 'plugin'=>$plugin, - 'path'=>Plugin::path($plugin), - 'classPath'=>Plugin::classPath($plugin), - ]); - $path = Plugin::classPath($plugin); - if (is_dir($path . 'Template' . DS . 'Bake')) { + $path = Plugin::path($plugin); + if (is_dir($path . $templates)) { $bakeThemes[] = $plugin; } }