Compare commits
7 Commits
856115bb7f
...
d71edc1556
Author | SHA1 | Date |
---|---|---|
Ruslan Baidan | d71edc1556 | |
Ruslan Baidan | 3d99019bfc | |
Ruslan Baidan | 5d92aa8aa5 | |
Ruslan Baidan | 2aa121d41b | |
Ruslan Baidan | 561e6793e1 | |
Ruslan Baidan | 4aacfe4ccf | |
Ruslan Baidan | 93b847191e |
File diff suppressed because it is too large
Load Diff
|
@ -6,17 +6,23 @@
|
|||
* @see https://github.com/zendframework/ZFTool
|
||||
*/
|
||||
$env = getenv('APP_ENV') ?: 'production';
|
||||
$appConfDir = getenv('APP_CONF_DIR') ?: '';
|
||||
$appConfDir = getenv('APP_CONF_DIR') ?: null;
|
||||
|
||||
$confPaths = ['config/autoload/{,*.}{global,local}.php'];
|
||||
defined('PROJECT_ROOT') or define('PROJECT_ROOT', __DIR__ . '/../');
|
||||
|
||||
if ($env !== 'testing') {
|
||||
$confPaths = ['config/autoload/{,*.}{global,local}.php'];
|
||||
}
|
||||
$dataPath = 'data';
|
||||
if (!empty($appConfDir)) {
|
||||
$confPaths[] = $appConfDir . '/local.php';
|
||||
$dataPath = $appConfDir . '/data';
|
||||
if (!is_dir($dataPath . '/cache')
|
||||
&& !mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)
|
||||
) {
|
||||
throw new RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
|
||||
if (!is_dir($dataPath . '/cache')) {
|
||||
if (is_dir(PROJECT_ROOT . 'data/cache')) {
|
||||
$dataPath = PROJECT_ROOT . 'data';
|
||||
} elseif (!mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)) {
|
||||
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue