mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(cloudcmd) add getPassword
This commit is contained in:
parent
ed6f8b0ee8
commit
5a36067bab
1 changed files with 7 additions and 2 deletions
|
|
@ -7,9 +7,10 @@
|
|||
DIR = __dirname + '/../',
|
||||
DIR_LIB = DIR + 'lib/',
|
||||
DIR_SERVER = DIR_LIB + 'server/',
|
||||
|
||||
|
||||
exit = require(DIR_SERVER + 'exit'),
|
||||
config = require(DIR_SERVER + 'config'),
|
||||
createPass = require(DIR_SERVER + 'password'),
|
||||
|
||||
options,
|
||||
argv = process.argv,
|
||||
|
|
@ -96,7 +97,7 @@ if (args.version) {
|
|||
};
|
||||
|
||||
if (args.password)
|
||||
options.password = args.password;
|
||||
config('password', getPassword(args.password));
|
||||
|
||||
if (!args.save)
|
||||
start(options);
|
||||
|
|
@ -106,6 +107,10 @@ if (args.version) {
|
|||
});
|
||||
}
|
||||
|
||||
function getPassword(password) {
|
||||
return createPass(config('algo'), password);
|
||||
}
|
||||
|
||||
function deprecate(was, became) {
|
||||
var value = args[was];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue