Skip to content

Commit

Permalink
[9.x] Fixes regression from laravel#44662
Browse files Browse the repository at this point in the history
Calling `php artisan --version` now going to failed.

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 3, 2022
1 parent 0de8734 commit c85a7df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Illuminate/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ public function run(InputInterface $input = null, OutputInterface $output = null
$input = $input ?: new ArgvInput
);

try {
$input->bind($this->find($commandName)->getDefinition());
} catch (ExceptionInterface) {
// ...
if (! is_null($commandName)) {
try {
$input->bind($this->find($commandName)->getDefinition());
} catch (ExceptionInterface) {
// ...
}
}

$this->events->dispatch(
Expand Down

0 comments on commit c85a7df

Please sign in to comment.