Display stars for secure config value

pull/189/head
Laurent Cozic 2018-01-28 17:35:20 +00:00
parent c6830499f7
commit 4531838217
1 changed files with 3 additions and 0 deletions

View File

@ -23,8 +23,11 @@ class Command extends BaseCommand {
const verbose = args.options.verbose;
const renderKeyValue = (name) => {
const md = Setting.settingMetadata(name);
let value = Setting.value(name);
if (typeof value === 'object' || Array.isArray(value)) value = JSON.stringify(value);
if (md.secure) value = '********';
if (Setting.isEnum(name)) {
return _('%s = %s (%s)', name, value, Setting.enumOptionsDoc(name));
} else {