1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00
appwrite/app/tasks/vars.php

25 lines
570 B
PHP
Raw Normal View History

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
2021-01-08 09:50:27 +13:00
foreach($config as $category) {
foreach($category['variables'] ?? [] as $var) {
$vars[] = $var;
}
}
foreach ($vars as $key => $value) {
2020-10-15 18:03:38 +13:00
Console::log('- '.$value['name'].'='.App::getEnv($value['name'], ''));
}
});