1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00
appwrite/app/tasks/vars.php
2022-05-23 14:54:50 +00:00

26 lines
579 B
PHP

<?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 () {
$config = Config::getParam('variables', []);
$vars = [];
foreach ($config as $category) {
foreach ($category['variables'] ?? [] as $var) {
$vars[] = $var;
}
}
foreach ($vars as $key => $value) {
Console::log('- ' . $value['name'] . '=' . App::getEnv($value['name'], ''));
}
});