From 4a7b11de8671177a65467536df26abe7cc921c4c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 6 Jun 2017 09:31:52 +0300 Subject: [PATCH] feature(cloudcmd) add CLOUDCMD_PASSWORD --- HELP.md | 1 + bin/cloudcmd.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HELP.md b/HELP.md index 5eaf6de0..38e6c1ba 100644 --- a/HELP.md +++ b/HELP.md @@ -336,6 +336,7 @@ Some config options can be overridden with `environment variables` such: - `CLOUDCMD_TERMINAL_PATH` - set terminal path - `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_AUTH` - enable authentication +- `CLOUDCMD_PASSWORD` - set password Menu --------------- diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index b61320ee..ee8b48be 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -121,8 +121,10 @@ function main() { prefix: args.prefix }; - if (args.password) - config('password', getPassword(args.password)); + const password = env('password') || args.password; + + if (password) + config('password', getPassword(password)); validateRoot(options.root);