Skip to content

Commit

Permalink
Merge pull request #675 from ewbarnard/master
Browse files Browse the repository at this point in the history
Use correct path for --theme option with bake
  • Loading branch information
markstory authored Apr 13, 2020
2 parents 918b88c + 761aab9 commit 7fbc8b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Utility/CommonOptionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -80,9 +81,10 @@ protected function extractCommonProperties(Arguments $args): void
protected function _setCommonOptions(ConsoleOptionParser $parser): ConsoleOptionParser
{
$bakeThemes = [];
$templates = 'templates' . DS . 'bake';
foreach (Plugin::loaded() as $plugin) {
$path = Plugin::classPath($plugin);
if (is_dir($path . 'Template' . DS . 'Bake')) {
$path = Plugin::path($plugin);
if (is_dir($path . $templates)) {
$bakeThemes[] = $plugin;
}
}
Expand Down

0 comments on commit 7fbc8b6

Please sign in to comment.