Unverified Commit e136cd76 authored by Nicolas Widart's avatar Nicolas Widart Committed by GitHub

Merge pull request #433 from joshbrw/bugfix/set-env-installer

Define the warning callback on the SetAppKey
parents 51c73b9b 973fd138
......@@ -4,12 +4,24 @@ namespace Modules\Core\Console\Installers\Scripts;
use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Encryption\Encrypter;
use Modules\Core\Console\Installers\SetupScript;
class SetAppKey implements SetupScript
{
use ConfirmableTrait;
/**
* @var Application
*/
private $application;
public function __construct(Application $application)
{
$this->application = $application;
}
/**
* Fire the install script
* @param Command $command
......@@ -90,4 +102,16 @@ class SetAppKey implements SetupScript
return "/^APP_KEY{$escaped}/m";
}
/**
* Get the default confirmation callback.
*
* @return \Closure
*/
protected function getDefaultConfirmCallback(): callable
{
return function () {
return $this->application->environment() === 'production';
};
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment