File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,17 @@ const { Command, Option } = require('commander');
2121const { exit } = require ( 'process' ) ;
2222const readline = require ( 'readline-sync' ) ;
2323
24- function readFromConsole ( question )
24+ function readFromConsole ( question , isPassword )
2525{
26- var answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" ) ;
26+ var answer ;
27+ if ( isPassword !== undefined && isPassword !== null && isPassword == true )
28+ {
29+ answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" , { hideEchoBack : true } ) ;
30+ }
31+ else
32+ {
33+ answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" ) ;
34+ }
2735 return answer ;
2836}
2937
@@ -52,7 +60,7 @@ function checkOptions(){
5260 }
5361
5462 if ( program . opts ( ) . password == undefined ) {
55- tenantPw = readFromConsole ( 'Please type your tenant User Password: ' ) ;
63+ tenantPw = readFromConsole ( 'Please type your tenant User Password: ' , true ) ;
5664 }
5765 else {
5866 tenantPw = program . opts ( ) . password
You can’t perform that action at this time.
0 commit comments