Skip to content

Commit

Permalink
Revert reboot state
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Oct 19, 2022
1 parent d8225e4 commit 354e8dd
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions src/Illuminate/Foundation/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ class Kernel implements KernelContract
*/
protected $commandStartedAt;

/**
* Indicates whether the application should reboot.
*
* @var bool
*/
protected $shouldReboot = false;

/**
* The bootstrap classes for the application.
*
Expand Down Expand Up @@ -155,10 +148,10 @@ public function handle($input, $output = null)
try {
if ($input->getFirstArgument() === 'env:decrypt') {
$this->bootstrapWithoutProviders();
} else {
$this->bootstrap();
}

$this->bootstrap();

return $this->getArtisan()->run($input, $output);
} catch (Throwable $e) {
$this->reportException($e);
Expand Down Expand Up @@ -336,10 +329,10 @@ public function call($command, array $parameters = [], $outputBuffer = null)
{
if ($command === 'env:decrypt') {
$this->bootstrapWithoutProviders();
} else {
$this->bootstrap();
}

$this->bootstrap();

return $this->getArtisan()->call($command, $parameters, $outputBuffer);
}

Expand Down Expand Up @@ -386,7 +379,7 @@ public function output()
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped() || $this->shouldReboot()) {
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}

Expand All @@ -397,8 +390,6 @@ public function bootstrap()

$this->commandsLoaded = true;
}

$this->shouldReboot = false;
}

/**
Expand All @@ -413,20 +404,6 @@ public function bootstrapWithoutProviders()
return $bootstrapper === \Illuminate\Foundation\Bootstrap\BootProviders::class;
})->all()
);

$this->bootstrap();

$this->shouldReboot = true;
}

/**
* Determine if the application should be rebooted.
*
* @return bool
*/
protected function shouldReboot()
{
return $this->shouldReboot;
}

/**
Expand Down

0 comments on commit 354e8dd

Please sign in to comment.