Commit a16d3cd3 by Qiang Xue

Do explicit check of local config file.

parent e82881ba
...@@ -16,10 +16,10 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); ...@@ -16,10 +16,10 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php'); require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
require(__DIR__ . '/vendor/autoload.php'); require(__DIR__ . '/vendor/autoload.php');
$config = require(__DIR__ . 'console/config/main.php'); $config = require(__DIR__ . '/console/config/main.php');
$localConfig = @include(__DIR__ . 'console/config/main-local.php'); $localConfig = __DIR__ . '/console/config/main-local.php');
if($localConfig!==false) { if (is_file($localeConfig)) {
$config = yii\helpers\ArrayHelper::merge($config, $localConfig); $config = yii\helpers\ArrayHelper::merge($config, require($localConfig));
} }
$application = new yii\console\Application($config); $application = new yii\console\Application($config);
......
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