Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ask for plugin path again for a vendor plugin. #1027

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions src/Command/PluginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@

protected bool $isVendor = false;

/**
* initialize
*
* @return void
*/
public function initialize(): void
{
parent::initialize();
$this->path = current(App::path('plugins'));
}

/**
* Execute the command.
*
Expand Down Expand Up @@ -114,10 +103,15 @@
*/
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);

Check warning on line 111 in src/Command/PluginCommand.php

View check run for this annotation

Codecov / codecov/patch

src/Command/PluginCommand.php#L111

Added line #L111 was not covered by tests
}
}

$io->out(sprintf('<info>Plugin Name:</info> %s', $plugin));
$io->out(sprintf('<info>Plugin Directory:</info> %s', $this->path . $plugin));
$io->hr();
Expand Down