2020-10-15 18:03:38 +13:00
|
|
|
<?php
|
|
|
|
|
|
|
|
global $cli;
|
|
|
|
|
|
|
|
use Utopia\App;
|
|
|
|
use Utopia\CLI\Console;
|
|
|
|
use Utopia\Config\Config;
|
|
|
|
|
|
|
|
$cli
|
|
|
|
->task('vars')
|
|
|
|
->desc('List all the server environment variables')
|
|
|
|
->action(function () {
|
2021-01-08 09:50:27 +13:00
|
|
|
$config = Config::getParam('variables', []);
|
|
|
|
$vars = [];
|
2020-10-15 18:03:38 +13:00
|
|
|
|
2022-05-24 02:54:50 +12:00
|
|
|
foreach ($config as $category) {
|
|
|
|
foreach ($category['variables'] ?? [] as $var) {
|
2021-01-08 09:50:27 +13:00
|
|
|
$vars[] = $var;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($vars as $key => $value) {
|
2022-05-24 02:54:50 +12:00
|
|
|
Console::log('- ' . $value['name'] . '=' . App::getEnv($value['name'], ''));
|
2020-10-15 18:03:38 +13:00
|
|
|
}
|
2022-05-24 02:54:50 +12:00
|
|
|
});
|