aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Config/App/GetConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Config/App/GetConfig.php')
-rw-r--r--core/Command/Config/App/GetConfig.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php
index f64efd3feaa..af0c5648232 100644
--- a/core/Command/Config/App/GetConfig.php
+++ b/core/Command/Config/App/GetConfig.php
@@ -9,19 +9,12 @@ declare(strict_types=1);
namespace OC\Core\Command\Config\App;
use OCP\Exceptions\AppConfigUnknownKeyException;
-use OCP\IAppConfig;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class GetConfig extends Base {
- public function __construct(
- protected IAppConfig $appConfig,
- ) {
- parent::__construct();
- }
-
protected function configure() {
parent::configure();
@@ -45,6 +38,12 @@ class GetConfig extends Base {
'returns complete details about the app config value'
)
->addOption(
+ '--key-details',
+ null,
+ InputOption::VALUE_NONE,
+ 'returns complete details about the app config key'
+ )
+ ->addOption(
'default-value',
null,
InputOption::VALUE_OPTIONAL,
@@ -73,6 +72,12 @@ class GetConfig extends Base {
return 0;
}
+ if ($input->getOption('key-details')) {
+ $details = $this->appConfig->getKeyDetails($appName, $configName);
+ $this->writeArrayInOutputFormat($input, $output, $details);
+ return 0;
+ }
+
try {
$configValue = $this->appConfig->getDetails($appName, $configName)['value'];
} catch (AppConfigUnknownKeyException $e) {