Skip to content

Commit

Permalink
fixed .env load
Browse files Browse the repository at this point in the history
  • Loading branch information
kilip committed Oct 30, 2018
1 parent 4e45645 commit ff27093
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions module/Core/src/Yawik.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ public static function init()
if (!is_file($env)) {
$env = getcwd().'/.env.dist';
}
if (!is_file($env)) {
return;
if (is_file($env)) {
$dotenv = new Dotenv();
$dotenv->load($env);
}
$dotenv = new Dotenv();
$dotenv->load($env);

$version = getenv('TRAVIS') ? "undefined":exec('git describe');
$branch = getenv('TRAVIS') ? "undefined":exec('git rev-parse --abbrev-ref HEAD', $output, $retVal);
static::$VERSION = $version.'['.$branch.']';
Expand Down

0 comments on commit ff27093

Please sign in to comment.