Skip to content

Commit 280f5d6

Browse files
committed
fix: use full path to executable instead of working directory
1 parent e997866 commit 280f5d6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Build/EnsurePluginIsInstalledStep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getDescription(): string
4747
*/
4848
public function perform(string $environment, ProjectConfiguration $projectConfiguration)
4949
{
50-
if (!WpCli::isYmirPluginInstalled($this->binDirectory, 'wp')) {
50+
if (!WpCli::isYmirPluginInstalled($this->binDirectory.'/wp')) {
5151
throw new RuntimeException('Ymir plugin not found');
5252
}
5353
}

src/WpCli.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ public static function isInstalledGlobally(): bool
3030
/**
3131
* Checks if the Ymir plugin is installed.
3232
*/
33-
public static function isYmirPluginInstalled(string $cwd = null, string $executable = ''): bool
33+
public static function isYmirPluginInstalled(string $executable = ''): bool
3434
{
35-
return self::listPlugins($cwd, $executable)->contains(function (array $plugin) {
35+
return self::listPlugins($executable)->contains(function (array $plugin) {
3636
return !empty($plugin['file']) && 1 === preg_match('/\/ymir\.php$/', $plugin['file']);
3737
});
3838
}
3939

4040
/**
4141
* List all the installed plugins.
4242
*/
43-
public static function listPlugins(string $cwd = null, string $executable = ''): Enumerable
43+
public static function listPlugins(string $executable = ''): Enumerable
4444
{
45-
$process = Process::fromShellCommandline(sprintf('%s plugin list --fields=name,status,version,file --format=json', self::getExecutable($executable)), $cwd);
45+
$process = Process::fromShellCommandline(sprintf('%s plugin list --fields=name,status,version,file --format=json', self::getExecutable($executable)));
4646
$process->run();
4747

4848
if (!$process->isSuccessful()) {

0 commit comments

Comments
 (0)