Skip to content

Commit

Permalink
Fixed config init in composer script
Browse files Browse the repository at this point in the history
  • Loading branch information
juneszh committed Sep 19, 2022
1 parent 442bcbc commit 1abd3d2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ public static function install()
$configFile = realpath('config/app.php');
if (!$configFile) {
throw new Exception('Missing configuration file: config/app.php');
} else {
Config::init($configFile);
self::insertConfig();
self::createTable();
}

Config::init($configFile);
self::insertConfig();
self::createTable();
}

/**
Expand Down Expand Up @@ -384,6 +384,13 @@ public static function download()
throw new Exception('PHP-CLI required.');
}

$configFile = realpath('config/app.php');
if (!$configFile) {
throw new Exception('Missing configuration file: config/app.php');
}

Config::init($configFile);

$package = 'juneszh/alight-admin';
$version = InstalledVersions::getPrettyVersion($package);

Expand Down

0 comments on commit 1abd3d2

Please sign in to comment.