Skip to content

Commit 933739b

Browse files
committed
Notice user to use ":" in config key.
Signed-off-by: Eric Wang <[email protected]>
1 parent cfaa0d9 commit 933739b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/commands/config.js

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ cmd.handler = function(argv) {
6565
if (argv.key.length === 0)
6666
return log.info(prettyConfig(loadConfig(argv.all)));
6767

68+
// sugar: notice user that use ':' instead of '.'
69+
if (argv.key.includes('.') && !argv.key.includes(':'))
70+
return log.printf('Key should use colon(:) as the delimiter, do you mean %s?',
71+
chalk.yellow(argv.key.replace(/\./g, ':')));
72+
6873
const v = nconf.get(argv.key);
6974

7075
// delete

0 commit comments

Comments
 (0)