fix: globalfunctions composer install error

This commit is contained in:
xiaomlove
2021-04-30 19:16:51 +08:00
parent b855fa4b0a
commit df4a0242a6

View File

@@ -289,6 +289,9 @@ function nexus_env($key = null, $default = null)
function readEnvFile($envFile)
{
if (!file_exists($envFile)) {
if (php_sapi_name() == 'cli') {
return [];
}
throw new \RuntimeException("env file : $envFile is not exists in the root path.");
}
$env = [];