diff --git a/src/Command/PluginCommand.php b/src/Command/PluginCommand.php
index 053006aa..fb2c83fc 100644
--- a/src/Command/PluginCommand.php
+++ b/src/Command/PluginCommand.php
@@ -45,17 +45,6 @@ class PluginCommand extends BakeCommand
protected bool $isVendor = false;
- /**
- * initialize
- *
- * @return void
- */
- public function initialize(): void
- {
- parent::initialize();
- $this->path = current(App::path('plugins'));
- }
-
/**
* Execute the command.
*
@@ -114,10 +103,15 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
*/
public function bake(string $plugin, Arguments $args, ConsoleIo $io): ?bool
{
- $pathOptions = App::path('plugins');
- if (count($pathOptions) > 1) {
- $this->findPath($pathOptions, $io);
+ if (!$this->isVendor) {
+ $pathOptions = App::path('plugins');
+ $this->path = current($pathOptions);
+
+ if (count($pathOptions) > 1) {
+ $this->findPath($pathOptions, $io);
+ }
}
+
$io->out(sprintf('Plugin Name: %s', $plugin));
$io->out(sprintf('Plugin Directory: %s', $this->path . $plugin));
$io->hr();