1
0
Fork 0
mirror of synced 2024-05-20 20:52:36 +12:00
appwrite/app/tasks/vars.php
2021-01-07 22:53:00 +02:00

25 lines
570 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'], ''));
}
});