Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/Command/Config/App/SetConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
* If not we get the type from current stored value or VALUE_MIXED as default.
*/
try {
$currType = $this->appConfig->getValueType($appName, $configName);
// Remove potential sensitive flag from type
$currType = $this->appConfig->getValueType($appName, $configName) & ~IAppConfig::FLAG_SENSITIVE;
if ($type === null || $typeString === null || $type === $currType || !$this->ask($input, $output, $typeString)) {
$type = $currType;
} else {
Expand Down Expand Up @@ -217,7 +218,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

} else {
$output->writeln('<info>Config value were not updated</info>');
$output->writeln('<info>Config value was not updated</info>');
}

return 0;
Expand Down
9 changes: 9 additions & 0 deletions tests/Core/Command/Config/App/SetConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ public static function dataSet(): array {
false,
'comment',
],
[
'name',
'newvalue',
true,
true,
true,
'info',
IAppConfig::VALUE_MIXED | IAppConfig::FLAG_SENSITIVE,
],
];
}

Expand Down