mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
feature(cloudcmd) add --prefix
This commit is contained in:
parent
6b3fbbe9fd
commit
d62049cd59
6 changed files with 19 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue