Skip to content

Commit 2428d1d

Browse files
committed
fix conflicts
2 parents 9598024 + b722497 commit 2428d1d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Illuminate/Console/Scheduling/ScheduleTestCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Illuminate\Console\Scheduling;
44

5+
use Illuminate\Console\Application;
56
use Illuminate\Console\Command;
6-
use Illuminate\Support\Str;
77
use Symfony\Component\Console\Attribute\AsCommand;
88

99
#[AsCommand(name: 'schedule:test')]
@@ -55,7 +55,11 @@ public function handle(Schedule $schedule)
5555
}
5656

5757
if (! empty($name = $this->option('name'))) {
58-
$matches = array_filter($commandNames, fn ($commandName) => Str::endsWith($commandName, $name));
58+
$commandBinary = Application::phpBinary().' '.Application::artisanBinary();
59+
60+
$matches = array_filter($commandNames, function ($commandName) use ($commandBinary, $name) {
61+
return trim(str_replace($commandBinary, '', $commandName)) === $name;
62+
});
5963

6064
if (count($matches) !== 1) {
6165
return $this->error('No matching scheduled command found.');

0 commit comments

Comments
 (0)