1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00
appwrite/app/tasks/vars.php

26 lines
579 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
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
});