mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
fix: globalfunctions composer install error
This commit is contained in:
@@ -289,6 +289,9 @@ function nexus_env($key = null, $default = null)
|
|||||||
function readEnvFile($envFile)
|
function readEnvFile($envFile)
|
||||||
{
|
{
|
||||||
if (!file_exists($envFile)) {
|
if (!file_exists($envFile)) {
|
||||||
|
if (php_sapi_name() == 'cli') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
throw new \RuntimeException("env file : $envFile is not exists in the root path.");
|
throw new \RuntimeException("env file : $envFile is not exists in the root path.");
|
||||||
}
|
}
|
||||||
$env = [];
|
$env = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user