feature(cloudcmd) add --prefix

This commit is contained in:
coderaiser 2015-08-10 07:39:24 -04:00
parent 6b3fbbe9fd
commit d62049cd59
6 changed files with 19 additions and 4 deletions

View file

@ -50,9 +50,9 @@
}
module.exports = function(params) {
var p = params || {},
var prefix,
p = params || {},
options = p.config || {},
prefix = p.prefix,
keys = Object.keys(options);
keys.forEach(function(name) {
@ -67,6 +67,13 @@
break;
case 'password':
value = createPass(config('algo'), value);
break;
case 'prefix':
if (!~value.indexOf('/'))
value = '/' + value;
prefix = value;
break;
}