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