Skip to content

Commit e3e638b

Browse files
authored
Merge pull request #6 from CottaCush/features/console-file-fixes
(Fixes): Fix directory name issues in yii file
2 parents ab4ff2c + 3662c0d commit e3e638b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

yii

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ require(__DIR__ . '/vendor/autoload.php');
1111

1212
// Load Environment Variables
1313
if (getenv('APPLICATION_ENV') != 'production') {
14-
$dotenv = new Dotenv\Dotenv(__DIR__ . DIRECTORY_SEPARATOR . 'env');
14+
$dotenv = new Dotenv\Dotenv(__DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR .'env');
1515
$dotenv->load();
1616
}
1717

1818
// Setup application environment
19-
$envs = ['develop', 'staging', 'production', 'local'];
19+
$envs = ['development', 'staging', 'production', 'local'];
2020
$env = getenv("APPLICATION_ENV");
2121

2222
if (!in_array($env, $envs)) {
@@ -30,10 +30,13 @@ if (in_array($env, ['local', 'develop'])) {
3030

3131
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
3232

33-
$config = require(__DIR__ . "/config/console.php");
33+
$config = require(__DIR__ . "/app/config/console.php");
3434

3535
// Set default timezone
3636
date_default_timezone_set("Africa/Lagos");
37+
if (!ini_get("auto_detect_line_endings")) {
38+
ini_set("auto_detect_line_endings", '1');
39+
}
3740

3841
$application = new yii\console\Application($config);
3942
$exitCode = $application->run();

0 commit comments

Comments
 (0)